Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Managed C++: RegistryKey Help

Status
Not open for further replies.

cchipman

IS-IT--Management
Sep 16, 2002
125
US
I'm having a bit of trouble. I've been working on a project in managed C++, but have been having a super difficult time acheive what would seem to be a relatively simple objective, to update a DWORD value in the registry.

I'm using the .NET RegistryKey class, but when I try this:

Code:
		int i = this->AimEnabled->Checked;

		this->pSettingsRegKey->SetValue(S"Send Message", i );

I get the following error:

Code:
 error C2664: 'Microsoft::Win32::RegistryKey::SetValue' : cannot convert parameter 2 from 'int' to 'System::Object __gc *'
        Conversion from a built-in type or a value type to 'System::Object __gc*' requires boxing

Can someone help me figure out what I need to do to make this work?

Thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top