Hi all,
I am maintaining some VB app which uses an inhouse developed activex control. Some (very few) of my users are getting runtime errors such as 372, 374, etc. The control was included in the app just by having a project group with the app and the cotnrol projects, and by dragging and dropping the control onto the form. I would really like:
1. To avoid runtime errors, instead catching the problem gracefully and providing a useful error code and graceful exit
2. To know exactly why the control failed to load or why VB thought the version might be outdated, when in fact the exact same distribution works everywhere else - in other words to quickly identify the problem and provide a fix such that it works consistently everywhere.
Counting on drag and drop is not cutting it, it always works fine on the dev pc and in lab testing, I can not force the thing to fail here, but the drag and drop does not provide any nice way to catch and identify errors before causing a runtime error. I need to take it upon myself to add error checking. I have already added and explicit call to DLLRegisterServer, hopefully that will catch any errors. But the nature of the RT errors is indicating not that it cannot load the control itself, but rather specifies that it cannot load the first class module which would be loaded from that control when the app is run.
In addition to registering the control programitcally withing the app, what other steps can I take to acheive this error checking?
Are most developers counting on RT errors alone, or are they adding such code as being desrcibed above?
Is it unusual to have multiple class modules within a control?
Thnx
I am maintaining some VB app which uses an inhouse developed activex control. Some (very few) of my users are getting runtime errors such as 372, 374, etc. The control was included in the app just by having a project group with the app and the cotnrol projects, and by dragging and dropping the control onto the form. I would really like:
1. To avoid runtime errors, instead catching the problem gracefully and providing a useful error code and graceful exit
2. To know exactly why the control failed to load or why VB thought the version might be outdated, when in fact the exact same distribution works everywhere else - in other words to quickly identify the problem and provide a fix such that it works consistently everywhere.
Counting on drag and drop is not cutting it, it always works fine on the dev pc and in lab testing, I can not force the thing to fail here, but the drag and drop does not provide any nice way to catch and identify errors before causing a runtime error. I need to take it upon myself to add error checking. I have already added and explicit call to DLLRegisterServer, hopefully that will catch any errors. But the nature of the RT errors is indicating not that it cannot load the control itself, but rather specifies that it cannot load the first class module which would be loaded from that control when the app is run.
In addition to registering the control programitcally withing the app, what other steps can I take to acheive this error checking?
Are most developers counting on RT errors alone, or are they adding such code as being desrcibed above?
Is it unusual to have multiple class modules within a control?
Thnx