Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Batch DLL Initialization Err num 31

Keywords: 	 Batch DLL Initialization Err num 31 

Question:

I am running the following script to get some registry infomation and I get a "Batch DLL Initialization Err num 31" when I run the compiled WinBatch on Win95 4.00.950a

This exe works OK on 95 4.00.950B (Win95 OEM release 2)and any later 9X or NT OS.

I have tested this on a Ghosted test PC from a clean build and have tried forcing the exe to create the WBDCH34i.dll on the PC and changed this and the exe to read only but still get the error. I can run other functions with compiled Winbatch exe's on this platform but when the regitry access exe from the script below is run it returns a "Batch DLL Initialization Err num 31".Any help very welcome.

;Get drive & custom install path and target panasonic.ldb
key = RegOpenKey(@REGMACHINE, "SOFTWARE\Panasonic\Desktop Telephony Assistant")
Serv = RegQueryValue(key, "[RT]")
Pathldb = StrCat(Serv,"\user\database\panasonic.ldb")

Message ("DTA Server Root Folder", Serv) 

Answer:

To me this sounds like a "custom" 95A installation.

There is a Video for Windows component msvfw32.dll that WinBatch requires.

1) Was installed by default in 95A, but doing a custom install you could deselect the VFW option.

2) VFW is a required part of the install from 95B and on and is on all NT/2000/XP platforms.

To help sort this out, get a copy of DependencyWalker from:

http://www.dependencywalker.com
and examine the WinBatch WBDxx34I.dll with it.

Question (cont'd):

OK I checked there is the Windows component msvfw32.dll on the Win95A machine. Not sure if this is the problem.

I tried the Dependancy Walker and looked at the Wbdch34i.dll and on the Win95A machine, it tells me that there is an "Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module." I'm emailing you the .dwi file, which should open in the dependancy walker. It indicates some sort of problem with COMCTL32.DLL, does this mean anything to you guys?

Life is strange.

This morning, one of my users called because he had an error 31 installing my application on a Win95 machine ! We checked a few things but could not find the problem.

He upgraded his Internet Explorer version to 5.5 and the problem was solved ! He says that this specific upgrade installs DCOM + MDAC and that this is what was causing the problem.

I don't have a hint of what this is all about, but I hope some of you can figure something out of this !

Answer:

Hmmm. Eeeek.

Good job on the DWI file, Works great. I can see what is going on.

Apparently Winbatch is looking for an entrypoint called InitCommonControlEx in the COMCTL32.DLL file.

It does not exist in your version of Windows 95. Installing MSIE 3.0 or newer should solve the problem. Or going back to an older version of WinBatch.

There have always been various DLL dependencies. However, starting with the new dialogs, a few new ones have been introduced. Developers claim that the InitCommonControlEx function is required for the new dialogs to work.

2002B and older have none of the new dialog stuff in them, and thus at least you can avoid a few of the new dependencies.