I\'m working on a legacy application that has a C++ extended stored procedure. This xsproc uses ODBC to connect to the database, which means it requires a DSN to be config
There is a CodeProject page on reading ODBC information.
Reading that should give you the information you need to reverse engineer writing the registry entries you need.
From that code;
private const string ODBC_LOC_IN_REGISTRY = "SOFTWARE\\ODBC\\";
private const string ODBC_INI_LOC_IN_REGISTRY =
ODBC_LOC_IN_REGISTRY + "ODBC.INI\\";
private const string DSN_LOC_IN_REGISTRY =
ODBC_INI_LOC_IN_REGISTRY + "ODBC Data Sources\\";
private const string ODBCINST_INI_LOC_IN_REGISTRY =
ODBC_LOC_IN_REGISTRY + "ODBCINST.INI\\";
private const string ODBC_DRIVERS_LOC_IN_REGISTRY =
ODBCINST_INI_LOC_IN_REGISTRY + "ODBC Drivers\\";