0

I have a .exe which is compiled from a combination of .for (fortran), and .c source files.

It does not run on anything later than Win98, due to an error with the graphics server:

“access violation error in User 32.dll at Ox7e4467a9”

Unless there is some other way around the above error (?), I assume I have to recompile the .exe from source using a more modern graphics server. I have all the files to do this bar one .lib file!

Is it possible to pull any info on the missing lib file out of the current .exe I have?

It is possible to dis-assemble the .exe, but I don't think I gain much from this?

animuson
  • 53,861
  • 28
  • 137
  • 147

2 Answers2

1

You probably can't "cut" the lib file from an executable. Even if you could somehow get the code from it, standard compilers and linker wouldn't know how to link against it, since it won't have the linking information needed (they are not included in the result binary).

However, if your problem is that your program works on Win98, but doesn't run on NT-based systems (XP, Vista, Win7), I think it would be easier to find out, what incompatibility is there that crashes the program. You mentioned that the access violation occurs in user32.dll. Start your program inside a debugger, take a look at which function the crash occurs. Make sure you have your PDB symbols loaded (so you can see names of internal non-public functions). Trace down which Win32 API is called and what are its parameters. Try to figure out, what should be at the memory that cannot be accessed.

Also without any other information, it's impossible to help you with that.

kuba
  • 7,329
  • 1
  • 36
  • 41
0

Once integrated into an image file (your exe), a library (your .lib) which is statically bound to an application (which is done by your linker) cannot be separated, differentiated from your own code, and thus, one cannot retrieve the code from a lib by decompiling the exe.

mox
  • 6,084
  • 2
  • 23
  • 35