|
-
Sep 30th, 1999, 01:42 AM
#1
Thread Starter
New Member
Help! I am attempting to register an ActiveX control from within VB as follows:
Declaration:
Declare Function RegMyControl Lib "MyControl.ocx" Alias "DllRegisterServer" () As Long
Then in code:
If RegMyControl <> &H0 Then 'an error has occured
The above only works if the ActiveX control is in the Windows, or in the Windows/System directories. VB seems to require a fixed string in the declaration for the Lib(rary).
Does anyone know how to do this if the ActiveX control is in another location?
Thanks!
-
Sep 30th, 1999, 10:01 PM
#2
New Member
As far as I know, there is no way to do this - you may be able to set the default system directory using an API call, but this would lead to the almost certain death of your OS.
What ya wanna do, is move the control into c:\win\sys, and then call the API.
-
Oct 1st, 1999, 02:39 AM
#3
Hyperactive Member
Try this:
Declare Function RegMyControl Lib "c:\path\to\myControls\MyControl.ocx" Alias "DllRegisterServer" () As Long
It just may work <IMG SRC="http://216.167.2.32/ubb/smile.gif">
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
|
Click Here to Expand Forum to Full Width
|