Dale -
Thanks for the post.
I don't know where the .ocx entries are coming from, we never used any of those controls, but we'll look into it.
The data directories are hard coded, and have to be changed to match your system - as you've already found out.
Here are some C snippets to get the data and buffer directories out of the registry. You'll have to use the corresponding VB functions if you want to get the directories from the registry.
HKEY hKeySetup; //Handle to the registry key for QP setup stuff DWORD Size; //Registry value size DWORD Type; //Registry value type
char DataDir[512]; char BufferDir[512];
//Get the handle to the quotes plus setup key in the registry RegOpenKeyEx( HKEY_LOCAL_MACHINE, "SOFTWARE\\QUOTES PLUS\\SETUP", 0, KEY_ALL_ACCESS, &hKeySetup );
//Find out the type and size of the value to query RegQueryValueEx( hKeySetup, "DataDir", NULL, &Type, NULL, &Size );
//Get value out of registry RegQueryValueEx( hKeySetup, "DataDir", NULL, &Type, (BYTE*)DataDir, &Size );
//Clear the type and size Size = 0; Type = 0;
//Get the size and type of the value RegQueryValueEx( hKeySetup, "BufferDir", NULL, &Type, NULL, &Size );
//Get the buffer directory RegQueryValueEx( hKeySetup, "BufferDir", NULL, &Type, (BYTE*)BufferDir, &Size ); |