colttaylor
Programmer
I just spent nine days debugging a perfectly healthy program which suffered from... (you guessed it...) a mis-registered activex control. My version of the control was happily waiting for my program in my \SHARED directory and some other software's incompatable version of the control was hidden elsewhere on the machine. A batch file which called the other software was regsrv32'ing each activex control it used whenever that software was started up.
I have a standing policy of never being bit by the same bug twice. The only redemption from my nine profitless days is that I will make my program stronger so that it never can happen again.
I am planning to read a list into my program from its ini file. That list will contain the filename, (guid ?), creation date and size of each of the activex controls which my program needs. At program startup, my program will test each activex control in the list. The test will work as follows...
1). Ask Windows for the filepath and filename of the current regsrv32'ed activex control.
2). Detect if that filepath and filename points to a real existing file.
3). Compare the creation date and size of that file and to those described in the list.
4). Report any discrepencies in a dialog box with adequate details such that a technician can debug the problem. Then allow normal entry into the program. Instructions from that dialog box would explain to the tech that if the program runs properly, then the ini should be modified... and if it doesn't then the register components should be replaced with my standard ones.
Does anybody now how to do step 1 in VB 6 code?
Thanks in advance!
Peace,
Colt
If it's stupid but it works, it isn't stupid
I have a standing policy of never being bit by the same bug twice. The only redemption from my nine profitless days is that I will make my program stronger so that it never can happen again.
I am planning to read a list into my program from its ini file. That list will contain the filename, (guid ?), creation date and size of each of the activex controls which my program needs. At program startup, my program will test each activex control in the list. The test will work as follows...
1). Ask Windows for the filepath and filename of the current regsrv32'ed activex control.
2). Detect if that filepath and filename points to a real existing file.
3). Compare the creation date and size of that file and to those described in the list.
4). Report any discrepencies in a dialog box with adequate details such that a technician can debug the problem. Then allow normal entry into the program. Instructions from that dialog box would explain to the tech that if the program runs properly, then the ini should be modified... and if it doesn't then the register components should be replaced with my standard ones.
Does anybody now how to do step 1 in VB 6 code?
Thanks in advance!
Peace,
Colt
If it's stupid but it works, it isn't stupid