|
-
Dec 20th, 2010, 10:27 AM
#1
Thread Starter
New Member
ActiveX OCX placing DLL in Windows\system32
I know this has been discussed but can't seem to find a resolution to my issue. I appreciate any advice!
I have an ActiveX OCX that uses picformat32.dll for some image handling operations. I've packaged up my OCX and referenced components into a CAB for deployment via IE using the VB Package and Deployment Wizard. The browser picks up the OCX and attempts to execute, but fails because the ocx's API call expects picformat32.dll to be in the Windows\system32 folder, and it's not getting placed there.
I've downloaded the Win SDK and handbuilt my INF and used cabarc to try and solve the problem, but nothing seems to work.
How to I get the picformat32.dll file - which is included in the CAB - to get copied to the client's Windows\system32 directory?
I don't want to have the users run a setup.exe program to install it, I was hoping that the browser could do it automatically.
Sorry for the newbish question. Happy Holidays!
-
Dec 20th, 2010, 10:31 AM
#2
Re: ActiveX OCX placing DLL in Windows\system32
Welcome to the forums.
1) A setup is the right way to go. It should require elevated privileges which would allow the dll to be installed/placed into the system folder.
2) Otherwise, place the dll in the same folder as your exe. By default, that's the first path searched for DLLs (as general rule of thumb)
You don't have issues registering the ocx? That may require elevated privileges also.
-
Dec 20th, 2010, 10:37 AM
#3
Thread Starter
New Member
Re: ActiveX OCX placing DLL in Windows\system32
my OCX registers fine, and the browser executes it correctly. The problem is, the part of my code that references picformat fails because that dll isn't in the client's Windows\system32 folder.
Is there any way to have the browser automatically place the dll in the system32 folder? There are what appear to be lots of controls for this in the CAB INF, from registering DLL's to defining locations where they should be placed.
PS - this is running in a LAN environment and the IIS server hosting the webpage is Trusted.
-
Dec 21st, 2010, 10:23 AM
#4
Re: ActiveX OCX placing DLL in Windows\system32
Here's another suggestion. Probably not ideal unless you reset the path.
1) Have your ocx start with Sub Main()
2) In sub main, make a call to SetDLLDirectory to append a path where the DLL can be found.
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
|