Problem converting unmanaged DLL to managed

S

Sin

Hello everyone,

I'm currently trying to migrate a MSVC6 project to .NET... The straight
conversion (ie : unmanaged) was extremely straightforward. Now I'm trying to
compile and hopefully run the project as managed to estimate the kind of
performance difference there will be for the kind of applications we do
here.

The project is composed of a EXE and 5 different DLLs. One of these DLL is
unmanaged (VC6) and can hopefully stay that way for my test since I do not
have access to the source code.

I got the whole thing to compile rather quickly in Release, but the thing
won't run. The program starts and ends immediatly, without any error or
warning from the OS.

I then tried to compile in Debug but got a couple errors concerning a /RTC1
and /clr conflict. After some research, I found out I had to use /NOENTRY to
avoid this error. This brought another problem. All the DLLs except one
(haven't found the reason yet) scream they can't find _main (LNK2019).

I messed around, looked on the net and couldn't find a reason why a DLL
would want a main... I simply added this :

void __cdecl main(void) {}

... and it "fixed" the compilation error... The Debug EXE doesn't work
either, but now I can at least see what the following errors are occuring :

'Opti.exe': Loaded 'C:\Projets\Debug.BIN\ConvMan.dll', Symbols loaded.
'Opti.exe': Loaded
'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll', No symbols
loaded.
'Opti.exe': Loaded 'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\msvcr71.dll',
Symbols loaded.
'Opti.exe': Loaded 'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\fusion.dll',
No symbols loaded.
'Opti.exe': Loaded
'C:\WINNT\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll', No symbols
loaded.
First-chance exception at 0x00000000 in Opti.exe: 0xC0000005: Access
violation reading location 0x00000000.
First-chance exception at 0x791b970e in Opti.exe: 0xC0000005: Access
violation reading location 0x000001a6.
The thread 'Win32 Thread' (0x560) has exited with code -2146233082
(0x80131506).
The program '[468] Opti.exe: Native' has exited with code -2146233082
(0x80131506).

I'm a bit confused now... It seems the "bug" happens before my code is even
called. I suppose this is a common problem and that perhaps someone could
help me with it...

Thanks alot,

Alex.
 
S

Sin

<Bump>

I can't beleive nobody here has any idea on how to resolve this...

Thanks,

Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top