Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DllRegisterServer with dynamic path of ocx 2

Status
Not open for further replies.

dtqui

Programmer
Sep 25, 2000
62
0
0
SG
Hi,

I need to register an ocx on user's PC through VB program. The process is as follows:

1) Find the user's Windows System folder
2) Copy the ocx to the Windows System folder
3) Register that ocx

I can do the first 2 with no problems but I can't register the ocx in the Windows System folder, it will always register the copy where I ran the program (i.e. instead of registering C:\Windows\System\swflash.ocx, it will register C:\temp\swflash.ocx where I am running the program). How do I specify the path of the Windows System folder without hardcoding it?

Public Declare Function RegMyServerObject Lib _
"swflash.ocx" _
Alias "DllRegisterServer" () As Long
 
Here's clue: you may possibly want to investigate the use of LoadLibrary ...
 
... using LoadLibrary as strongm suggested

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top