Click to See Complete Forum and Search --> : Registering ActiveX controls under Win'95 OSR1
Martin Randall
May 5th, 1999, 05:43 AM
I'm having a problem installing an ActiveX control onto machines with Win95 OSR1. Regsvr32.exe fails. I'm assuming that I need to add something to these machines so that ActiveX controls work. Does anyone know what it is and can I freely distribute it with my ActiveX control program?
-------------------------------------------
Martin Randall - Team 17 Software Ltd
-------------------------------------------
http://www.team17.com http://www.worms2.com
-------------------------------------------
BrianOG
May 5th, 1999, 08:24 AM
When regsvr32 fails it gives you the error code.
Check the VC help to match this number to a error description.
The most common one is 485, which means that there is a dll missing. If this is the case, ensure that any dlls you are using are on the new system. Ensure that any MFC / MSVCRT dlls necessary are on the system, and that they are the same (or newer) version to the ones on the development system. And finally check that the oleaut32.dll & olepro32.dll (in windows system) are the same (or newer) versions to the ones on the development system.
If none of these work, try going through the list of dlls loaded when you run your program (shown in the debug window of VC) and check each of these.
But then again, the error code mighn't be 485 :-)
Martin Randall
May 5th, 1999, 08:34 AM
It seems that the problem is more a case of the fact that ActiveX was not introduced in to Windows until IE3.01 - and that in order to have ActiveX controls run correctly on a user's machine, they must have at least IE3.01 installed. Is this the case?
-------------------------------------------
Martin Randall - Team 17 Software Ltd
-------------------------------------------
http://www.team17.com http://www.worms2.com
-------------------------------------------
mdwilliams
May 5th, 1999, 12:29 PM
This most likely has to do with the fact that stdole2 is not available in base retail version of Windows 95. So, you can either get them to upgrade OLE (I think there is an install for this) or change the following in your .idl file.
(1) Comment out "importlib("stdole2.tlb")" in your .idl file.
(2) Change the MIDL compiler command to include /oldtlb, because without this flag the MIDL compiler still puts a reference to stdole2.
(3) When using the /oldtlb compiler switch, make sure you don't specify any custom interfaces in your coclass. Simply declare the base interface definition (i.e. IDispatch or IUnknown). VC5's MIDL chokes if you give a custom interface. There's no documentation on this from Microsoft, but according to some newsgroup postings this is a bug in MIDL included with VC5 sp3.
Anyway, hope this is useful.
-- Matt
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.