• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

rundll32 error with Warcraft 3

Status
Not open for further replies.
Level 11
Joined
Jan 30, 2010
Messages
548
Hello everyone,

I got a serious problem with my computer which is making it impossible to play warcraft 3. When I open (right click options or by double click) warcraft3.exe, the game doesn't start. No flash screen, no crashes, just plain refuses to start.
Waiting a while and starting again the game starts flawlessly. This only happens when I start warcraft 3, all other games and apps work fine. I have a few other games on my computer which are heavier than wc3 but run fine.

So for some time I followed the above procedure to play wc3 but I realized that there was a lag in gameplay. After the quiting the game I experienced significant lag in other apps. So, I opened the task manager and saw that one process rundll32.exe was eating 25% of my CPU! So I terminated it by end process command. This .exe gets easily terminated but starts everytime I run wc3. It does not surface in any other games and apps.

Another interesting thing is that rundll32 won't surface if I start wc3 via the world editor (test map). I don't understand what the problem is but it sure is annoying. I even cleaned my registry and scanned by PC for viruses twice but to no avail.

Help please!
 
Level 11
Joined
Jan 30, 2010
Messages
548
I really hate this rundll32, I always close it if I see it running, seems to be more of a trouble than good. I believe that if you see it in task manager, some code caused it hanging, making it dead process (talking out of my ass actually).

It is trouble and only trouble all the way. I did some research last night and learned a few important things about this error which I would like to share here, in case anybody else might want to counter the problem (including you Mechanical Man).
-----------------------------------------------------------------------------------------------------------------------------------------------

First that this error appears if you execute older versions of Microsoft Visual C++ on newer Windows (7 and 8), for experimental coding or when running older games which require these libraries. Atleast that is what I have come to understand. This error also appeared in XP but its not worth mentioning cause its dead already.

Second, if you run into rundll32 error while starting a game in Win 7 and 8 it is not due to the rundll32 file itself but due to the windows game manager application. An application which is pointless and worthless to begin with. The game manager (or whatever you call it) can be accessed in Win 7 via the start menu, its on the left panel. It shows you all your game installations and game devices at one place. Other than that it also has a function similar to the media player, it gathers additional info, media and art related to installed games. For that purpose it makes an online check every time you start a game to gather info from the web. If for some reason the connection to the internet fails or if you have your router or internet adapter disabled, it gives you that rundll32 error. Eating your CPU even if the computer is unused!!

Third, deleting the rundll32.exe by going into windows system folder is not a viable option as it can lead to further errors or make some programs not work properly. Anyways the problem lies in the fecking worthless game manager app. So it is wise to disable it before CPU over heats too much.

Now the Solution.

So you go into games manager --->options.
Check: Never check online for updates.
Uncheck: Download art and info from web
Uncheck: Collect most recently played game info.

This should work for most people and you will stop getting rundll32 error.

Solution 2 is to permanently disable the game manager. This is how you do it.
Go to command prompt and type this or simply copy this command below and paste it into search programs and folders in start menu and then execute. (why is there no run command box in win 7?)

---------
for 32 bit:
---------
regsvr32 -u c:\windows\system32\gameux.dll

---------
for 64 bit:
---------
regsvr32 -u c:\windows\SysWOW64\gameux.dll

This disables the dll file associated with the game manager and stops rundll32 error without any additional problems.

You can also restore the original settings:

regsvr32 c:\windows\system32\gameux.dll

regsvr32 c:\windows\SysWOW64\gameux.dll


Any other thoughts on this?

Unanswered Question:
I have found a viable solution but it still doesn't make sense why I only encountered the problem while running wc3 and all other programs and apps worked just fine. Perhaps someone would like to throw more light on the topic.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
Microsoft Windows 95, Windows 98, and Windows Millennium Edition (Me) contains two command-line utility programs named Rundll.exe and Rundll32.exe that allow you to invoke a function exported from a DLL, either 16-bit or 32-bit. However, Rundll and Rundll32 programs do not allow you to call any exported function from any DLL. For example, you can not use these utility programs to call the Win32 API (Application Programming Interface) calls exported from the system DLLs. The programs only allow you to call functions from a DLL that are explicitly written to be called by them. This article provides more details on the use of Rundll and Rundll32 programs under the Windows operating systems listed above.

MIcrosoft Windows NT 4.0, Windows 2000, and Windows XP ship with only Rundll32. There is no support for Rundll (the Win16 utility) on either platform.

The Rundll and Rundll32 utility programs were originally designed only for internal use at Microsoft. But the functionality provided by them is sufficiently generic that they are now available for general use. Note that Windows NT 4.0 ships only with the Rundll32 utility program and supports only Rundll32.

Rundll loads and runs 16-bit DLLs, whereas Rundll32 loads and runs 32-bit DLLs. If you pass the wrong type of DLL to Rundll or Rundll32, it may fail to run without indicating any error messages.
Rundll command line
The command line for Rundll is as follows:

RUNDLL.EXE <dllname>,<entrypoint> <optional arguments>

An example is as follows:

RUNDLL.EXE SETUPX.DLL,InstallHinfSection 132 C:\WINDOWS\INF\SHELL.INF

There are 3 issues to consider carefully in the above command line: 1.Rundll or Rundll32 search for the given DLL filename in the standard places (see the documentation for the LoadLibrary() function for details). It is recommended that you provide a full path to the DLL to ensure that the correct one is found. For best results, use the short file name instead of the long file name to ensure that no illegal characters will appear. Note in particular that this means a DLL in the "C:\Program Files" folder should be converted to its short name.
2.The <dllname> may not contain any spaces or commas or quotation marks. This is a limitation in the Rundll command line parser.
3.In the above command line, the comma (,) between the <dllname> and the <entrypont> function name is extremely important. If the comma separator is missing, Rundll or Rundll32 will fail without indicating any errors. In addition, there cannot be any white spaces in between the <dllname>, the comma, and the <entrypoint> function.

How Rundll Works
Rundll performs the following steps: 1.It parses the command line.
2.It loads the specified DLL via LoadLibrary().
3.It obtains the address of the <entrypoint> function via GetProcAddress().
4.It calls the <entrypoint> function, passing the command line tail which is the <optional arguments>.
5.When the <entrypoint> function returns, Rundll.exe unloads the DLL and exits.

How to Write Your DLL
In your DLL, write the <entrypoint> function with the following prototype:

16-bit DLL:



void FAR PASCAL __loadds
EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);

32-bit DLL:

void CALLBACK
EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);

Again, there are 3 issues to consider with the EntryPoint function: 1.Obviously, the name "EntryPoint" should be replaced with the actual name of your entry point function. Note that the Rundll32's entry point is completely unrelated to the DllEntryPoint function in a 32-bit DLL which handles process and thread attach/detach notifications.
2.The entry point function for Rundll32 must be defined with the _stdcall calling convention (CALLBACK defaults to using the _stdcall attribute). If the _stdcall attribute is missing, then the function defaults to _cdecl calling convention and then Rundll32 will terminate abnormally after calling the function.
3.Since you must declare the function with _stdcall calling convention as described above, it follows that the Visual C++ compiler will actually export it as _EntryPoint@16 if the DLL is written in C or will use further name decoration if the DLL is written in C++. So, be careful to use the correctly exported name in the command line for Rundll or Rundll32. If you want to avoid using decorated names, use a .def file and export the entry point function by name. Please refer to the product documentation and the following article for further information on name decoration when using Visual C++ compilers:
140485

Exporting PASCAL-Like Symbols in 32-bit DLLs
The parameters to the Rundll entry point are as follows:

hwnd - window handle that should be used as the owner window for
any windows your DLL creates
hinst - your DLL's instance handle
lpszCmdLine - ASCIIZ command line your DLL should parse
nCmdShow - describes how your DLL's windows should be displayed

In the following example:

RUNDLL.EXE SETUPX.DLL,InstallHinfSection 132 C:\WINDOWS\INF\SHELL.INF

Rundll would call the InstallHinfSection() entrypoint function in Setupx.dll and pass it the following parameters:

hwnd = (parent window handle)
hinst = HINSTANCE of SETUPX.DLL
lpszCmdLine = "132 C:\WINDOWS\INF\SHELL.INF"
nCmdShow = (whatever the nCmdShow was passed to CreateProcess)

Note that it is the <entrypoint> function (or InstallHinfSection() in the above example) that has to parse its own command line (the lpszCmdLine parameter above) and use the individual parameters as necessary. Rundll.exe parses only up to the optional arguments passed to its command line. The rest of the parsing is up to the <entrypoint> function.
Special Notes On Differences Between Windows 95 And Windows NT
On Windows NT, Windows 2000, and Windows XP the behavior of Rundll32.exe is slightly different, in order to accommodate UNICODE command lines.

Windows NT first attempts to GetProcAddress for <EntryPoint>W. If this entry point is found, then the prototype is assumed to be:

void CALLBACK
EntryPointW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine,
int nCmdShow);

This is the same as the ANSI EntryPoint, except that the lpszCmdLine parameter is now a UNICODE string.

If the <EntryPoint>W entry point is not found, then Windows NT will GetProcAddress for <entrypoint>A and for <entrypoint>. If either is found, then it is considered an ANSI entry point and is treated the same way as Windows 95/98/Me. Therefore, if you want your DLL to run on Windows 95 with ANSI support and on Windows NT/2000/XP with UNICODE support, you should export two functions: EntryPointW and EntryPoint. On Windows NT/2000/Me, the EntryPointW function will be called with a UNICODE command line; on Windows 95/98/Me, the EntryPoint function will be called with an ANSI Command line.

This should explain what it is. For more detail you will need to post what command line arguments it was invoked with.
 
Status
Not open for further replies.
Top