K
Kniffel
hi everyone
I programm an ISAPI extension with embedded Visual C++ for a Windows
CE device.
I try to write the network settings to the registry.
I am able to write the IpAdress to the registry, but when I compare my
registry entry and the one made with the Windows CE settings, I miss
some hex chars:
The Way I write my registry entry:
LONG iSuccess = RegCreateKeyEx( HKEY_LOCAL_MACHINE, lpstrKey, 0L,NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey,lpdwDisp);
if(iSuccess == ERROR_SUCCESS) {
lpstrSubkey = L"IpAddress";
MultiByteToWideChar(CP_ACP, 0, NetValueArray[queryCounter], -1,
lpstrSubkeyValue, sizeof(lpstrSubkeyValue));
/**** WRITE A HEX VALUE IN REGISTRY ****/
DWORD dwDispHex = 0;
LPDWORD lpdwDispHex = &dwDispHex;
iSuccess = RegCreateKeyEx( HKEY_LOCAL_MACHINE, lpstrKey,
0L,NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,
&hKey,lpdwDispHex);
if(iSuccess == ERROR_SUCCESS)
{
RegSetValueEx(hKey, lpstrSubkey, 0, REG_MULTI_SZ,
(LPBYTE)lpstrSubkeyValue, strlen(NetValueArray[queryCounter])*2);
}
}
This results in this Registry Entry:
"IpAddress"=hex(7):\
31,32,33,2e,31,32,33,2e,31,32,33,2e,31,32,33
The same Registry Entry made in the Windows CE settings looks like
that:
"IpAddress"=hex(7):\
31,32,33,2e,31,32,33,2e,31,32,33,2e,31,32,33,00,00
What kind of hexchar is 00?
And how can I add this to my registry entry?
Greetings
Thomas
I programm an ISAPI extension with embedded Visual C++ for a Windows
CE device.
I try to write the network settings to the registry.
I am able to write the IpAdress to the registry, but when I compare my
registry entry and the one made with the Windows CE settings, I miss
some hex chars:
The Way I write my registry entry:
LONG iSuccess = RegCreateKeyEx( HKEY_LOCAL_MACHINE, lpstrKey, 0L,NULL,
REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey,lpdwDisp);
if(iSuccess == ERROR_SUCCESS) {
lpstrSubkey = L"IpAddress";
MultiByteToWideChar(CP_ACP, 0, NetValueArray[queryCounter], -1,
lpstrSubkeyValue, sizeof(lpstrSubkeyValue));
/**** WRITE A HEX VALUE IN REGISTRY ****/
DWORD dwDispHex = 0;
LPDWORD lpdwDispHex = &dwDispHex;
iSuccess = RegCreateKeyEx( HKEY_LOCAL_MACHINE, lpstrKey,
0L,NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL,
&hKey,lpdwDispHex);
if(iSuccess == ERROR_SUCCESS)
{
RegSetValueEx(hKey, lpstrSubkey, 0, REG_MULTI_SZ,
(LPBYTE)lpstrSubkeyValue, strlen(NetValueArray[queryCounter])*2);
}
}
This results in this Registry Entry:
"IpAddress"=hex(7):\
31,32,33,2e,31,32,33,2e,31,32,33,2e,31,32,33
The same Registry Entry made in the Windows CE settings looks like
that:
"IpAddress"=hex(7):\
31,32,33,2e,31,32,33,2e,31,32,33,2e,31,32,33,00,00
What kind of hexchar is 00?
And how can I add this to my registry entry?
Greetings
Thomas