Not a win32 application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

At times if I send an application developed in C# to a client's to run.
After the initial run and I close the application, if I double click it to
start then it give a "Not a win32 application error" and would not start.

My experience with this has been on Windows XP. Can I have a solution?
 
Belee said:
At times if I send an application developed in C# to a client's to
run. After the initial run and I close the application, if I double
click it to start then it give a "Not a win32 application error" and
would not start.

Sounds like a file corruption. .NET code files are portable executable
(PE) files, just like Win32 files. So they should be treated as Win32
executables. On Windows before XP the operating system has to read the
process's unmanaged entrypoint that will initialize the .NET runtime
(and pass it the managed entrypoint), so every .NET process will have at
least one exported Win32 function. (XP has a different mechanism - it
reads the .NET process, determines that it is a managed process, starts
the runtime and then passes it the managed entrypoint.)
My experience with this has been on Windows XP. Can I have a
solution?

Hmmm this does sound to me that the process is corrupted. Run dumpbin on
the process, for example if its called app.exe try this:

dumpbin /headers app.exe

Check that this gives reasonable values, ie there must be a .text data
section and the COM Descriptor Directory in the 'optional header' has
non-zero values. Also check:

dumpbin /clrheader app.exe you should see that the size is 48 and the
version (for .NET 1.1) is 2.00

Richard
 
Sometimes low memory condition also can cause this problem. But given the
amount of memory we have these days, unless the client have server softwares
running (SQL, Exchange, etc.) it's very unlikely.
 
Back
Top