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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Types in the registry

Status
Not open for further replies.

destroyhead

Programmer
Feb 22, 2006
27
GB
Hi everybody,

I need to retrieve data in the registry.
In order to do that I have got this type of code (example for REG_DWORD) :

outParam = wmiRegistry.InvokeMethod("GetDWORDValue", inParam, null);
if ((uint)outParam["ReturnValue"] == 0)
div1.InnerHtml += outParam["uValue"].ToString() + "<br />";

What I need are the strings for the other types
Here is what I already have :
REG_BINARY --> GetBinaryValue --> uValue (?)
REG_DWORD --> GetDWORDValue --> uValue
REG_DWORD_LITTLE_ENDIAN --> ? --> uValue (?)
REG_DWORD_BIG_ENDIAN --> ? --> uValue (?)
REG_EXPAND_SZ --> GetExpandedStringValue --> ?
REG_LINK --> ? --> ?
REG_MULTI_SZ --> GetMultiStringValue --> sValue (?)
REG_NONE --> ? --> ?
REG_QWORD --> GetQWORDValue --> ?
REG_QWORD_LITTLE_ENDIAN --> GetQWORDValue --> ?
REG_SZ --> GetStringValue --> sValue

If someone can fill one of the missing data, I would greatly appreciate it.

Regards.

Olivier
 
Why are you going through WMI, when you can write some P/Invoke code that'll be much faster?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi chiph,
Thanks very much for your help.
I do not understand what you are suggesting.
Have you got an example?
Thanks again.
Regards.
Olivier
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top