-
how do i check on the register if an OCX or DLL its correctly regged?
hi there guys again...
i was wondering, how can i make a program to check if certain libs are installed and correctly registered in teh registry of Windows?...
i ask this, cuz i have a proggie that needs certain OCXs, and when some of them are not correctly installed, it gives me an "out of memory" error in my program(besides other weird things you already know...), so, i'd like to add a check in the very begginin of the program, so that wont happen again.
thx for your help...
Kaspal.
-
interesting question...
I use the controls.Add method, and catch the error, but I am wondering myself of a better way
"There are two ways to write error-free programs. Only the third one works."
Unknown
-
do you know where does the Regsrv32.exe program store the keys in teh registry?... maybe by checkin those keys that program creates, its a way to findin out?....
-
the keys are pretty much everywhere in the registry, this is why it is so difficult to find them, and even if they seem correct it is possible that there is a corruption. And, because of the "DLL ****" problem, where every one of us has been before or later, the really only robust way I found to see if a component is registered properly is to try to load it.
Otherwise... well, it is always possible to open the ocx/dll as a typelib, and get the list of the CLASSID for every public component. Then open the registry and look for those keys in the HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID branch, and see if they point to the right executable and right version. A **** of a job...
EDIT: ops, I have been censored... well, I meant that place that is not heaven
"There are two ways to write error-free programs. Only the third one works."
Unknown
-
You could also use the CoCreateInstance API to try to instantiate the control's CLSID. There's a VB Declare and example here: http://vbnet.mvps.org/code/internet/...torydelete.htm
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
By Sean Woods in forum VB Classic
Replies: 0
Last Post: 01-11-2002, 04:10 PM
-
By Larry Rebich in forum VB Classic
Replies: 8
Last Post: 10-30-2001, 12:38 PM
-
By Larry Rebich in forum VB Classic
Replies: 0
Last Post: 10-29-2001, 10:01 PM
-
By Tuan in forum VB Classic
Replies: 6
Last Post: 04-27-2000, 10:30 PM
-
By Tuan in forum VB Classic
Replies: 0
Last Post: 04-26-2000, 11:36 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks