|
-
Jan 5th, 2002, 02:38 AM
#1
Thread Starter
Hyperactive Member
Please help with registry access
Hello,
I am trying to convert Visual Basic Registry Access to C++ functions and i have a lot of errors about conversions but i have no idea how to fix them.
PHP Code:
char* RegQueryStringValue (HKEY__* key, char* cValue)
{
ulong* iResult;
ulong* iValueType;
ulong iBuffSize;
unsigned char zBuff;
iResult = RegQueryValueEx (key, cValue, NULL, iValueType, &zBuff, iBuffSize);
// if (iResult == 0){
// if (iValueType == 1){
// char zBuff[iBuffSize];
// iResult = RegQueryValueEx (key, cValue, NULL, iValueType, &zBuff, iBuffSize);
// }
// }
}
char* GetSetting(HKEY__* key, char* cPath[], char* cValue[])
{
//Read a setting from registry
unsigned long int hKey;
unsigned short int hDataType;
char zBuff[256];
RegOpenKey (key, cPath*, hKey);
strcpy(zBuff, RegQueryStringValue (&hKey, cValue);
RegCloseKey (hKey);
}
I am a newbie to C++. Please help me.
Thanks,
-
Jan 6th, 2002, 12:38 PM
#2
Re: Please help with registry access
I fixed errors, but I'm too lazy to explain them now.
Originally posted by made_of_asp
Hello,
I am trying to convert Visual Basic Registry Access to C++ functions and i have a lot of errors about conversions but i have no idea how to fix them.
PHP Code:
char* RegQueryStringValue (HKEY key, char* cValue)
{
LONG iResult;
DWORD iValueType;
DWORD iBuffSize;
BYTE zBuff[100];
iResult = RegQueryValueEx (key, cValue, NULL, &iValueType, zBuff, &iBuffSize);
// if (iResult == 0){
// if (iValueType == 1){
// char zBuff[iBuffSize];
// iResult = RegQueryValueEx (key, cValue, NULL, iValueType, &zBuff, iBuffSize);
// }
// }
}
char* GetSetting(HKEY key, char* cPath, char* cValue)
{
//Read a setting from registry
HKEY hKey;
unsigned short int hDataType;
char zBuff[256];
RegOpenKey (key, cPath, &hKey);
strcpy(zBuff, RegQueryStringValue (hKey, cValue); // function does not exist
RegCloseKey (hKey);
}
I am a newbie to C++. Please help me.
Thanks,
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|