StanChart
asked on
Need some assistance configuring registry keys
Hi All,
I'm trying to programatically set registry keys to configure a Microsoft Access data source. One problem I am having is after I set a REG_SZ key's value. When I look at the key in the registry, the key's value shows up as "my keys value"...
Anyone know why there is a "..." after the key's value? For some reason, this is not being read by the control panel's data source manager.
Here's my code:
************************** ********** ********** ********** *****
CString dbLocation = "C:\\database.mdb";
CString key = "Software\\ODBC\\ODBC.INI\ \MY_DataSo urce";
HKEY hKey;
DWORD dwType = REG_SZ;
::RegCreateKeyEx(HKEY_LOCA L_MACHINE, key, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwType);
::RegSetValueEx(hKey, "DBQ", 0, REG_SZ, (const unsigned char*)(LPCTSTR)dbLocation, MAX_PATH);
************************** ********** ********** ********** *****
There are other keys but I did not include them as it would be repetitive.
Thanks for your help.
I'm trying to programatically set registry keys to configure a Microsoft Access data source. One problem I am having is after I set a REG_SZ key's value. When I look at the key in the registry, the key's value shows up as "my keys value"...
Anyone know why there is a "..." after the key's value? For some reason, this is not being read by the control panel's data source manager.
Here's my code:
**************************
CString dbLocation = "C:\\database.mdb";
CString key = "Software\\ODBC\\ODBC.INI\
HKEY hKey;
DWORD dwType = REG_SZ;
::RegCreateKeyEx(HKEY_LOCA
::RegSetValueEx(hKey, "DBQ", 0, REG_SZ, (const unsigned char*)(LPCTSTR)dbLocation,
**************************
There are other keys but I did not include them as it would be repetitive.
Thanks for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER