Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5351

RegSetValueEx to Create ODBC Entries

$
0
0

I am using CVI 5.0.1 and would like to create ODBC entries without using the ODBC manager in Administrative Tools.   I do not have access to the new CVI functions:

 

RegWriteString()

 

which would make it simple.  Any sample code using the SDK functions such as RegSetValueEx would be helpful.  I have written a sample program containing:

 

const char dname[] = "V2002ERR";
LONG kstat;
  
   
    kstat = RegSetValueEx(HKEY_USERS,"Software\\ODBC\\ODBC.INI\\ODBC Data Sources",0,REG_SZ,dname,8);

 

It returns a 0, which is ERROR_SUCCESS, but does not write the key value.  I am missing something somewhere.

 

Thanks in advance, David

 

 

 

 


Viewing all articles
Browse latest Browse all 5351

Trending Articles