Silverfrost Forums

Welcome to our forums

Debugging P/Invoke DLL

22 Jul 2008 9:46 #3514

Learned Friends

I am currently working on breaking up a large executable into three smaller DLLs

The original program was written entirely in FTN77 to a Fortran IV standard.

We have made a nice GUI in C# which call the new DLL's using P/Invoke.

We are using C# to read any write a SQL Server database.

because the Fortran is comiled to Win32 not .NET. We do it this way because the change to compiling the code to be .NET is to big and or risky (in a Business Sense).

We have written a C++ DLL to raise event from the Fortran to be caught by C#.

All this has worked swimmingly.

however we are struggling to debug the Fortran code.

I have written a harness FTN95 EXE that calls a C++ DLL that calls the C# Code and this works and we get a sensible results in the Debug window visual studio 2005.

but I getting strange problem somewhere in the C# code a call to a microsoft function.

I get a message box

Assert ish!=null

is this a message from FTN95 debugger ???? or something else

I also get a similar thing happening using SDBG

Carl

23 Jul 2008 7:27 #3515

'Asserts' are commonly used in Microsoft code and very rarely (if ever) used in Silverfrost code.

You would expect to get them in native Microsoft GUI code and in the relevant bindings from C#.

23 Jul 2008 8:28 #3517

thanks Paul

you have confirmed my suspicions.

however I only seem to get this assert occurring when using the silverfrost debugger, the C++ and C# debugger don't trips it. Is there any chance that there is some sort of clash going on.

I will keep digging

Carl

Please login to reply.