WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Error Codes

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Batch DLL Initialization Error

 Keywords: Err Num Batch DLL initialisation initialization

Question:

I am recieving the Error message:
'Batch DLL initialization error Err num - {nnn}'

Appreciate if you could tell me what is the problem.

Answer:

The 'Err Num - {nnn}' can mean the following:

1-32  Windows System errors in WINERROR.H 

33-43 could be either Windows System errors or WinBatch errors:

  

WinBatch Errors

33 Interface Error: DLL GetProcAddress Failure 34 OBJ mismatch: Version Interface Incompatible 35 DLL mismatch: DoDaDllInit (0) failed 36 GlobalAlloc (data) failed 37 GlobalAlloc or GlobalLock or RegisterClass failed DoDaDllInit (1) failed 38 GlobalAlloc failed GlobalAlloc (vars) failed 39 GlobalLock failed DoDaDllInit (2) failed 40 VirtualAlloc (MEM_RESERVE) failed - insufficent actual memory 41 VirtualAlloc (MEM_RESERVE) failed - insufficent desired memory 42 VirtualAlloc (MEM_COMMIT) failed 43 DoDaDllInit (3) failed 44-99999 Windows System errors in WINERROR.H


Err Num 10

ERROR_BAD_ENVIRONMENT

Question:

When running compiled WinBatch code on some machines, I get a Batch Initialization Error, Err Num 10.

The machine in question is a WIN95 machine. It does have an older version of the WinBatch compiler installed. The WBT version of the program runs fine. Any ideas what to look for????

Answer:

In the 32 bit version of WinBatch it is a umm "Bad Environment" error. I'm not sure what that means exactly...its one of those Microsoft errors.

In the 16 bit version it says "Incorrect Windows Version".

Obviously the script is upset. What version of Windows are you running this on. It will not work on Windows 3.0 (We need at least 3.1 to survive)

What about the machines the script fails on? What version of WinBatch and 16/32 bit WinBatch. Is Win32s involved??? WinBatch 32 cannot properly run on Windows 3.1 machines with Win32S installed - although I would suspect a different sort of error. Make sure you have the latest version of WinBatch.

Basically the EXE file is running, and when it attempts to link with its DLL it fails. There's probably going to be a bad or corrupt copy of the DLL out there someplace (85% probability), or a bad network card ( 2%).

A user reported that this error when another (newer) version of a DLL he was using was installed on his system, as follows:

One of the process files executed downloaded a newer version of DDEML.DLL from its source directory. The newer DLL was from a Win95 machine. The target machines are Win31. So, the error description 'Invalid Windows Version' is somewhat correct.

DDEML.DLL runs most DDE operations. Not a lot of Windows 3.1 apps use it.


Err Num 11

ERROR_BAD_FORMAT

An attempt was made to load a program with an incorrect format.


Err Num 22

ERROR_BAD_COMMAND

Question:

I get this error when running a large compiled 16-bit EXE, on some of my PCs that have Windows 95, using the 16-bit compiler.

On others, the same PC works just fine.

Answer:

ERROR_BAD_COMMAND: "The device does not recognize the command"

This error isn't documented as being supposed to happen in 16-bit versions.

Sounds like something very strange going on. Could be a corrupt DLL. Does WBDBP16I.DLL actually get extracted? Maybe search for any stray copies of that DLL, and then try it again (and check again for the DLL having been extracted). Or copy over a known good copy of the DLL. And it couldn't hurt to get the latest version of Winbatch.

Resolution:

The user searched to see if any of the DLL's had been copied, and found the WBDBP16I.DLL file name existed but had a file size of 0. When he deleted the file name the batch procedure worked.

Most likely the earlier failed attempt to run this procedure caused the file name to be created, but failed to actually copy the file.


Err Num 31

ERROR_GEN_FAILURE

Question 1:

What is the trick to get a winbatch executable to run on a Win95 machine? I have version 2004G being compiled on WinXP SP2 When I launch a script I get the following error:

Batch DLL initialization error
Err num 31

Answer 1:

I think a COM (a.k.a. OLE) function that has been used by WB for a long time is causing the problem. WB's COM subsystem was not a part of the main WB dll prior to 2004B so COM related operating system entry points were not resolved until you created your first COM object in a WB script. WB 2004B and later has COM as an integral part of the main WB DLL and all COM related entry points are resolved at program startup.

You need at least Win95b to use WB 2004b or later.

Question 2:

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 2:

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 2 (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 2 (cont'd):

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.

Question 3:

I'm getting this error on a compiled EXE that I'm trying to kick off on particular server, but this same EXE runs fine on another machine.

I have two compiled WB EXE and the first large EXE launches fine, it then does a RunWait of the 2nd EXE. The 2nd EXE is getting the Batch Initialization error 31, and it gets the error regardless of whether it's run standalone or RunWaited from the 1st EXE.

I have two DLLs in the same directory as the EXEs: WBDBM32I.DLL and WBDBV32I.DLL.

Answer 3:

The error description for this error is:

General failure

"A device attached to the system is not functioning"
Kind of cryptic.

Your EXEs are created by two different versions of the compiler and the one EXE that's failing with this error message is trying to access a DLL that's become corrupted.

Rename all the Winbatch DLLs on that server to force the large EXEs to recreate their DLLs locally. Then once that's done and it's working again, mark those DLLs and EXEs read-only.

If that doesn't work, run DiskScan on the affected drive with a "thorough" setting to inspect the disk surface. Some kind of weird corruption maybe.


Err Num 32

ERROR_SHARING_VIOLATION

Question:

Does any one know what is the maximum number of winbatch exe's that can be put into the startup folder on an NT 4.0 box. ?

I'm getting a "Batch DLL Initializastion error,Err num 32" if more than 2 are put into the startup.

If there is no limit, does any one know what the problem/answer is ?

Answer:

Error sounds like a sharing violation. Mark the DLL's and EXE's as read only. We also suggest using the small EXE model.


Err Num 127

ERROR_PROC_NOT_FOUND

Question:

I am trying to run a script on a NT3.51 and getting the following error. Batch DLL Initialization Error Err Num 127. Winbatch ver = 2003c, script has no extenders included.

Answer:

OK. It looks bad. WinBatch 2002C (thereabouts) and newer does not run on NT 3.51.


Err Num 39

GlobalLock failed DoDaDllInit (2) failed

Question:

Can you tell me what to check to resolve a DLL initialization error 39? The tech database lists this as "GlobalLock failed" but doesn't add any details.

Answer:

It generally awful bad news. WinBatch is reaching out to get a little memory to hold various bits of information during WinBatch initialization. A request for some memory failed. The machine is simply out of memory for some reason, and rejected WinBatch's request for memory.

Sometimes increasing paging file size might help here. Or closing down 20 or 30 other applictions to free up the wee tad of memory that WinBatch needs.

Maybe just a reboot might help.

Or maybe there has been a hardware failure.

Did you try the script on more than one machine??? In any case what is the history of the bug? As the script has not even started execution, the script code is innocent (generally).


Err Num 193

ERROR_BAD_EXE_FORMAT

Problem:
I'm running a very simple large compiled EXE up on my Windows NT 3.51 machine, and when I go to launch it, I'm getting the following error:

	WINMM.DLL Not a Valid Windows NT Image
	Please check this against your installation disk
then I hit OK, and get the following Winbatch error:
	Error 193:  Batch DLL Initialization Error
I see that my WinBatch DLL (WBDBN32I.DLL) is getting written out to the directory in which I've installed the compiled EXE. What's my problem?

Answer:
WINMM.DLL is a Windows multimedia DLL. When WinBatch launches, we scout around and link to a bunch of Windows DLLs including this one, in case we need them later on in the script.

If one of these DLLs is toast, then we'll complain with this error message.

Replace the WINMM.DLL with a good one from another machine with the same version of Windows, and try running it again. That will most likely fix the problem.


Err Num 999

ERROR_SWAPERROR

Question:

I'm using the current wwwsk34I.dll with a wbt-file compiled with winbatch-96. The operating system is Nt 3.51 server. I'm getting an occasional error:

"Batch DLL initialization error - Err num 999"
The problem happens very infrequently, but when it does, it is a -major- problem in our second shift batch cycle. I'm not calling any other DLL's except yours. Please explain.

Answer:

Need a little more info. Like WHEN does it occur?

Assuming it occurs at startup - the most likely case - it indicates that the WinBatch EXE file started to run but could not then access its DLL's.

What could be the problem? Depends.

Might be out of file handles. (Night operatiors got too many games running?) Wrong user account? Network totally loaded down (I don't think so.) Server won't allow any more open file handles?

Need to pin down a few more details of the situation.

Another possibility is the improper closing of other files/processes throughout the first shift. (or 16-bit apps that Win95 doesn't always see very well).

I have seen a number of cases in Win3.x and Win95 where file handles slowly over time get built up until there is a restart of the system.

You may want to tell the workers, should you nail down a few programs that do not close well, that they might consider minimizing those programs and leave them running, so as to not use up file handles.


Err Num 1114

ERROR_DLL_INIT_FAILED

This is an unusual error. The 1114 error indicated that Windows could not initialize our WIL DLL (WBDxx34I.DLL) properly. I've never actually seen this error before. Here are some things to check:

Version of Windows? Version of WinBatch? 16 or 32 bit version? Did it die right at the beginning, or did setup seem to run for a while and keel over later? Are you trying to install from disks or from a zip file?

Possible problems:

Some background:
When you click on the setup.exe, it starts a portion of the WinBatch program. (The setup program is written as a compiled winbatch script) The first thing it does is to go out and attempt to load the above mentioned DLL. It really can't do anything at all until the dll is loaded. Apparently Windows tried loading the DLL, and it crashed. The error got back to the setup program that reported the 1114 error.

Either the zip file got corrupted somehow and/or the WIL DLl (WBDxx34I.DLL) is somehow corrupted and/or the setup.exe is somehow confused about things.

You might try re-unzipping the file and check carefully for any error messages. If the downloaded zip is bad, the unzip program should whine about something.


Err Num 1157

ERROR_DLL_NOT_FOUND

WinBatch is unable to locate its own WinBatch wbd___.dll

Possible reasons:
WinBatch has been moved to a different directory after setup. Or the dll has some how been deleted.

Steps to take:


Err Num -1073741674

If the problem occures in version 99P, we *may* have a fix for you. New DLL files.

The current theory is that anti-virus software with old signature files is causing a problem.

Your options.

  1. Disable runtime virus checking (for testing only)
  2. Get new virus signature files from your vendor
  3. We can email you uncompressed DLLS that don't trigger your anti-virus program (maybe 1MB total)

Another user resolved this problem by removing a disable USB 2.0 line from the VMware StartUp Config file. Apprently the problem mysteriously started after adding this line to the config file. Not exactly sure how removing the line from the config file is connected to WinBatch but it seemed to resolve the issue.



Article ID:   W15942
File Created: 2014:07:18:09:51:38
Last Updated: 2014:07:18:09:51:38