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

Download my .ocx that depends on 2 other dll’s?

Status
Not open for further replies.

d00ape

Programmer
Apr 2, 2003
171
SE
Hi,
I’m developing an ActiveX-control in VS C++ 6.0 (winXP): works fine.
For deplyment, I’m using VS.NET for making the Cab-file (New project: Cab
Project). Adds ocx and builds Cab: works fine.

Problem: ocx is depending on 2 other dlls, as it is now they are downloaded and registered manually: this works some times, some times it is "Dll Hell".... "Dll hell" occurs when updating ocx and dlls.... is there any way to force registration and so on? My belive is that it will work fine if I just adds the dll to the Cab File-project, could that be rigth? If so, how do I do it in VS.NET (I know how to add the files, but it’s not working when adding the depending dlls)?

I’m also a bit confused of the making of the Cab File, with VS.NET (Cab Project, OSD-file) it’s easy, but I dont know what I’m doing... old tech, with INF-file, it was harder, but more open I guess?

Which is the best solution in my case?
 
I've never gotten the CAB project in VS.NET to work. I use the old tech CAB tools. Not just harder and more open, it actually works, as opposed to VS.NET which is just [hairpull3] !

Maybe the problem is when you update existing DLLs, you are not increasing the version number? I don't think it will update an existing component unless the new one has a greater version number.

Another thing you can try is provide a small "installer" program that the INF file launches, that manually registers the new components. For each DLL, just LoadLibrary them and then DllRegisterServer them. You might also need to copy the new DLL files, overwriting the old ones.

I haven't learned how exactly to do this yet, but the last time I was looking at a reference guide for making INF files I thought I saw a way to include such an "installer" program. I need to figure this out for my own project soon anyway. So If you haven't solved your problem in the next few weeks I'll post here what I find out about it myself.
 
OK thanks!

Actually a CAb-project, for me, works fine in .NET. But only if It only contains one .ocx

I struggle on myself and let you know if I make any steps towards the goal of "dll hell".

 
I got same kind of problem whith my activex which needs gdiplus.dll

i can't make it work if i include this dll for w2k/w98 target.(if i only specify my activex dll, it works on a xp system as gdiplus is already installed).
see both .INF files at the end with OSD and logs.

When not working, I can notice that the gdiplus.dll is copied in my "windows\downloaded program files" (as expected), but not the ax.dll which is not registered by the way

All i want is to have those two DLLs copied in "windows\downloaded program files" (necessary that gdiplus is in the same place as my control) and then my control being registered.

I have searched for days now...and i'm ready to jump from the bridge now... so if someone can save me ;)

Thx

NB: my .CAB was generated under VS 2003 with cab project.
Don't kown if OSD is correct as it is automatically generated.

-- SIMPLE WORKING VERSION ---
[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
Ax.dll=Ax.dll

[Ax.dll]
file-win32-x86=thiscab
file=thiscab
FileVersion=1,0,0,6
clsid={7DG181BB-EF8D-4A7E-8C53-7BFC748EF71D}
RegisterServer=yes


-- COMPLETED BUT NOT WORKING VERSION ---
[version]
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
Ax.dll=Ax.dll
gdiplus.dll=gdiplus.dll

[gdiplus.dll]
file-win32-x86=thiscab
file=thiscab
FileVersion=5,1,3097,0
RegisterServer=no

[Ax.dll]
file-win32-x86=thiscab
file=thiscab
FileVersion=1,0,0,6
clsid={7DG181BB-EF8D-4A7E-8C53-7BFC748EF71D}
RegisterServer=yes


-- CORRESPONDING OSD --
<?XML version="1.0" ENCODING='UTF-8'?>
<!DOCTYPE SOFTPKG SYSTEM "<?XML::namespace href=" as="MSICD"?>
<SOFTPKG NAME="CabGDI" VERSION="1,0,0,6">
<TITLE> CabGDI </TITLE>
<MSICD::NATIVECODE>
<CODE NAME="gdiplus">
<IMPLEMENTATION>
<CODEBASE FILENAME="gdiplus.dll">
</CODEBASE>
</IMPLEMENTATION>
</CODE>
</MSICD::NATIVECODE>
<MSICD::NATIVECODE>
<CODE NAME="Ax">
<IMPLEMENTATION>
<CODEBASE FILENAME="Ax.dll">
</CODEBASE>
</IMPLEMENTATION>
</CODE>
</MSICD::NATIVECODE>
</SOFTPKG>

-- LOGS FOR DOWNLOAD CAB INCLUDING GDIPLUS --
*** Code Download Log entry (27 Jul 2004 @ 01:55:11) ***
Code Download Error: (hr = 80040154) Classe non enregistrée

Operation failed. Detailed Information:
CodeBase: file:///D:/Documents%20and%20Settings/Tanguy/Mes%20documents/Visual%20Studio%20Projects/activex/src/CabGDI/Release/Cabgdi.cab
CLSID: {7DG181BB-EF8D-4A7E-8C53-7BFC748EF71D}
Extension:
Type:

WRN: OCX Registration: no DllRegisterServer entry point in (D:\WINDOWS\Downloaded Program Files\gdiplus.dll). Skipping registration. INF Author: mark this section with RegisterServer=No as a performance optimization.
--- Detailed Error Log Follows ---
LOG: Download OnStopBinding called (hrStatus = 0 / hrResponseHdr = 0).
LOG: URL Download Complete: hrStatus:0, hrOSB:0, hrResponseHdr:0, URL:(file://D:\Documents and Settings\Tanguy\Mes documents\Visual Studio Projects\activex\src\CabGDI\Release\Cabgdi.cab)
WRN: OCX Registration: no DllRegisterServer entry point in (D:\WINDOWS\Downloaded Program Files\gdiplus.dll). Skipping registration. INF Author: mark this section with RegisterServer=No as a performance optimization.
LOG: Setup successful installing: gdiplus.dll to (null) destination code(0)
LOG: Setup successful installing: OSD181.OSD to (null) destination code(0)
LOG: Reporting Code Download Completion: (hr:80040154, CLASSID: 7dg181bb..., szCODE:(file:///D:/Documents%20and%20Settings/Tanguy/Mes%20documents/Visual%20Studio%20Projects/activex/src/CabGDI/Release/Cabgdi.cab), MainType:(null), MainExt:(null))


I already put RegisterServer=No, don't know why the warning still remains
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top