Random Vb6 error , usually for 'load control(array)' statement
Quote:
"Failed to load control 'A' from B.OCX. Your version of B.OCX may be outdated. Make sure you are using the version of the control that was provided with your application."
This error comes randomly in vb6 application exe, will not repeat when application is closed and opened (i.e can't recreate error) usually comes for 'load control(array)' statement
What is the cause for this error? (registration of ocx file is done properly, also it works most of the time)
tried the solution given here , but same error repeats.
Re: Random Vb6 error , usually for 'load control(array)' statement
Can you look in task manager how many GDI handles your process is using when this error occurs. There is a hard limit of 10k
Re: Random Vb6 error , usually for 'load control(array)' statement
Quote:
Originally Posted by
wqweto
Can you look in task manager how many GDI handles your process is using when this error occurs. There is a hard limit of 10k
GDI handles are less than 2000
Re: Random Vb6 error , usually for 'load control(array)' statement
Quote:
Originally Posted by
winman
GDI handles are less than 2000
You have less than 2k GDI handles in use just *when* the Load statement is failing?
cheers,
</wqw>
Re: Random Vb6 error , usually for 'load control(array)' statement
Quote:
Originally Posted by
wqweto
Can you look in task manager how many GDI handles your process is using when this error occurs. There is a hard limit of 10k
GDI handles are between 2k to 3k when the program is running.
Re: Random Vb6 error , usually for 'load control(array)' statement
Quote:
Originally Posted by
winman
GDI handles are between 2k to 3k when the program is running.
Can you instrument your error handling code on the failing Load statement to dump GDI and OS objects counts? Might want to include RAM used by process too.
Doubt you can investigate this problem w/o some coding effort.
Re: Random Vb6 error , usually for 'load control(array)' statement
Do you have the source code for the ocx?
Was the ocx registered via a setup.exe or manually? Or if using SxS manifests?
Do you know if the ocx removed the option to dynamically "upgrade activex controls" (which is default to true)?
Is there any chance that the ocx is dynamically registering/unregistering stuff?