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!

Do I need to register Dlls

Status
Not open for further replies.

Maoz

Programmer
May 16, 2004
2
0
0
IL
Hi, I created a new Active-x with Visual C++ 6, MFC.
This Active-x is using 3 of my dlls.
I'm using the Active-x on my site with "CODEBASE".
When I'm loading my site from a system that owns MFC, it works perfectly, but when the user doesn't own it, I'll get an error on the installation.
I have 2 questions:
1. Do I need to register the 3 dlls on the user system?
2. what's is the current problem in my INF file:

my INF file:
-------------------------------------------------------
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
Funk_AX.ocx=Funk_AX.ocx
amsdb.dll=amsdb.dll
amsgdb.dll=amsgdb.dll
EFunkDll.dll=EFunkDll.dll
EFunk_EffectsDll.dll=EFunk_EffectsDll.dll

; These are the necessary supporting DLLs for MFC 4.2 ActiveX Controls
mfc42.dll=mfc42.dll
msvcrt.dll=msvcrt.dll
olepro32.dll=olepro32.dll

[Funk_AX.ocx]
file-win32-x86=thiscab
file=thiscab
CLSID={A0E0E878-803A-4311-831D-8E0FDC7A2EAE}
FileVersion=1,0,1,5
RegisterServer=yes

[amsdb.dll]
file-win32-x86=thiscab
FileVersion=1,0,0,8

[EFunkDll.dll]
file-win32-x86=thiscab
FileVersion=1,0,1,5

[EFunk_EffectsDll.dll]
file-win32-x86=thiscab
FileVersion=1,0,0,5

; dependent DLLs
[msvcrt.dll]
; This is an example of conditional hook. The hook only gets processed
; if msvcrt.dll of the specified version is absent on client machine.
FileVersion=4,20,0,6164
hook=mfc42installer

[mfc42.dll]
FileVersion=4,2,0,6256
hook=mfc42installer

[olepro32.dll]
FileVersion=4,2,0,6068
hook=mfc42installer

[mfc42installer]
file-win32-x86=VALUE=; If dependent DLLs are packaged directly into the above cabinet file
; along with an .inf file, specify that .inf file to run as follows:
;InfFile=mfc42.inf
; The mfc42.cab file actually contains a self extracting executable.
; In this case we specify a run= command.
run=%EXTRACT_DIR%\mfc42.exe
-----------------------------------------------------------
This is the log file I get when the user doesn't own the MFC:
----------------------------------------------------------
*** Code Download Log entry (16 May 2004 @ 12:44:16) ***
Code Download Error: (hr = 8007007e)

Operation failed. Detailed Information:
CodeBase: CLSID: {A0E0E878-803A-4311-831D-8E0FDC7A2EAE}
Extension:
Type:

LOG: Item Funk_AX.ocx being processed.
--- Detailed Error Log Follows ---
LOG: Download OnStopBinding called (hrStatus = 0 / hrResponseHdr = 0).
LOG: Item Funk_AX.ocx being processed.
LOG: Item amsdb.dll being processed.
LOG: Item EFunkDll.dll being processed.
LOG: Item EFunk_EffectsDll.dll being processed.
LOG: Item mfc42.dll being processed.
LOG: Item msvcrt.dll being processed.
LOG: Item olepro32.dll being processed.
LOG: URL Download Complete: hrStatus:0, hrOSB:1, hrResponseHdr:0, URL:(WRN: OCX Registration: no DllRegisterServer entry point in (C:\WINDOWS\Downloaded Program Files\CONFLICT.3\EFunk_EffectsDll.dll). Skipping registration. INF Author: mark this section with RegisterServer=No as a performance optimization.
LOG: Setup successful installing: EFunk_EffectsDll.dll to (null) destination code(0)
WRN: OCX Registration: no DllRegisterServer entry point in (C:\WINDOWS\Downloaded Program Files\CONFLICT.3\EFunkDll.dll). Skipping registration. INF Author: mark this section with RegisterServer=No as a performance optimization.
LOG: Setup successful installing: EFunkDll.dll to (null) destination code(0)
WRN: OCX Registration: no DllRegisterServer entry point in (C:\WINDOWS\Downloaded Program Files\CONFLICT.3\amsdb.dll). Skipping registration. INF Author: mark this section with RegisterServer=No as a performance optimization.
LOG: Setup successful installing: amsdb.dll to (null) destination code(0)
LOG: File C:\WINDOWS\Downloaded Program Files\CONFLICT.3\Funk_AX.ocx being registered.
ERR: Setup Failed Error Code: (hr) = 8007007e, installing: Funk_AX.ocx to (null) destination code(0)
LOG: Reporting Code Download Completion: (hr:8007007e (FAILED), CLASSID: a0e0e878..., szCODE:( MainType:(null), MainExt:(null))
 
I think the problem is you did not specify a destination directory for those 3 DLL's, so they are not being copied to a directory which is in the user's search path.

The three warnings are just telling you the DLL's don't contain any COM objects, so no need to register them as such. To get rid of these warnings, put a "RegisterServer=no" in the [*.dll] sections for those DLL's (as the warnings suggest).

Then when the error is displayed, it is because the Funk_AX.ocx did not open properly, probably because it tried to load those three other DLL's and could not find them in the search path.

Try adding a "DestDir=11" in each of the [*.dll] sections. The "11" means the Windows system folder. For reference see this MSDN page.
 
could you explain briefly what the search path is? i'd appreciate. thanks
 
so here's error log from ie when trying to load and initilize the cab file. ImageMagickObject.dll fails to register (funny thing is that i can do it manually using 'regsvr32 c:\ImageMagickObject.dll' and then then webcontrol runs just fine)


Operation failed. Detailed Information:
CodeBase: CLSID: {463A929B-621A-4460-B7FD-257E2637DAAE}
Extension:
Type:

LOG: Item IM_Dep_Test.ocx being processed.
--- Detailed Error Log Follows ---
LOG: Download OnStopBinding called (hrStatus = 0 / hrResponseHdr = 0).
LOG: Item IM_Dep_Test.ocx being processed.
LOG: Item ImageMagickObject.dll being processed.
LOG: Item msstkprp.dll being processed.
LOG: Item CORE_RL_magick_.dll being processed.
LOG: Item CORE_RL_ttf_.dll being processed.
LOG: Item CORE_RL_zlib_.dll being processed.
LOG: Item X11.dll being processed.
LOG: Item CORE_RL_bzlib_.dll being processed.
LOG: Item CORE_RL_jpeg_.dll being processed.
LOG: Item CORE_RL_lcms_.dll being processed.
LOG: Item msvcr71.dll being processed.
LOG: Item CORE_RL_tiff_.dll being processed.
LOG: Item msvbvm60.dll being processed.
LOG: Item OLEAUT32.DLL being processed.
LOG: Item OLEPRO32.DLL being processed.
LOG: Item ASYCFILT.DLL being processed.
LOG: Item STDOLE2.TLB being processed.
LOG: Item COMCAT.DLL being processed.
LOG: URL Download Complete: hrStatus:0, hrOSB:0, hrResponseHdr:0, URL:(LOG: Setup Hook AddToRegHook was executed successfully.
LOG: Setup successful installing: CORE_RL_lcms_.dll to (null) destination code(0)
LOG: Setup successful installing: X11.dll to (null) destination code(0)
LOG: Setup successful installing: CORE_RL_magick_.dll to (null) destination code(0)
LOG: File C:\WINNT\system32\ImageMagickObject.dll being registered.
ERR: Setup Failed Error Code: (hr) = 8007007e, installing: ImageMagickObject.dll to (null) destination code(b)
LOG: Reporting Code Download Completion: (hr:8007007e (FAILED), CLASSID: 463a929b..., szCODE:( MainType:(null), MainExt:(null))
 
somebody available to solve this for money: 30 us dollar?
cheers
 
Error code 0x8007007E means "The specified module could not be found." I think the control tried to load one of the three DLLs installed right before it, and couldn't find it, because they are installed to destination "0", which is the downloaded component cache directory. This is probably not in the default search path.

Try setting DestDir=11 for those other 3 DLLs too.

By "search path" I mean all the directories listed under your "Path" environment variable. Go to the control panel, double-click the "system" icon, select the "Advanced" tab, and click the button near the bottom of the dialog, marked "Environment Variables". Now look for a variable named "Path". This will be a semi-colon delimited list of paths that Windows searches through when looking for EXEs and DLLs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top