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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

registering an ocx in Windows7

Status
Not open for further replies.

coldan

Programmer
Oct 19, 2008
98
AU
I have used Imageviewer OCX in my app for a number of years.
I wish to recompile with some additional functions.

I have upgraded my dev pc to Windows 7 64bit

I now find that the OCX doesn't want to install from my Inno setup file.

So as a first step I am trying to register it manually using regsvr32 whic is in system32 and is on the path.

I am sitting at C:\ in a command prompt run as Administrator with the ocx copied into root c:\.

I type regsvr32 ImageViewer2.OCX

I am told 'The module ImageViewer2.OCX failed to load.
Make sure the binary is stored at the specified path....
The specified module could not be found.'

Have I missed something here.

i have emailed Viscom Software but as yet haven't got a reply and the few days off are an ideal time to get this sorted out.
 
Hi Coldan,

Could be that the message means exactly what it says. Have you tried specifying the full path to the OCX:

regsvr32 c:\windows\system32\ImageViewer2.OCX

or whatever.

I know you said that the OCX on the path, but I'd suggest you try the above before anything else.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Is it possible that Windows 7 is preventing you to register something in the root of c:\? Have you tried to register it elsewhere (with fullpath of course).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
2 Mikes,

I've tried every combination of paths folders etc.

I found an article which suggested using the copy of regsvr32 that is in \sysWOW64 rather than \system32.

But that combination doesn't work either.


Has anyone successfully manually registered an ocx/dll in Win 7?

I'd like to try and replicate a successful one here.

Thanks

Coldan
 
Further...

1st attempt in 2010 HNY everyone.

I found wiaaut.dll on my system and tried that.

Initially the error was as before but I realised the folder [P:\_DEV\_FoxPro\Dist Folders\Control] with it in had a space in the name. _ I used "path" quotes and the dll registration succeeded.

Doing the same to the ocx command line failed again.

However I took further notice of the error message contents re missing files and added two other files that I found came with the ocx - in particular an lpk file and gdiplus.dll

Success!

Now I need to get it right in my Inno compiler script.

Thanks

Coldan
 
Well done, Coldan. It was worth persevering.

The Inno script entries should be straightforward. You probably need the following Flags for each of the DLLs, with the DLLs specified in the same order as you did it manually:

Flags: regserver sharedfile

But don't quote me on that. You might need a bit of trial and error.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thanks Mike,

Setup is now loading the dll/ox successfully from

Source: P:\_DEV\_FoxPro\Dist Folders\Control\ImageViewer2.OCX; DestDir: "{app}"; Flags: regserver ignoreversion

Coldan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top