View previous topic :: View next topic |
Author |
Message |
DrTip
Joined: 01 Aug 2006 Posts: 74 Location: Manchester
|
Posted: Tue Jul 22, 2008 10:46 pm Post subject: Debugging P/Invoke DLL |
|
|
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 |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8217 Location: Salford, UK
|
Posted: Wed Jul 23, 2008 8:27 am Post subject: |
|
|
"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#. |
|
Back to top |
|
 |
DrTip
Joined: 01 Aug 2006 Posts: 74 Location: Manchester
|
Posted: Wed Jul 23, 2008 9:28 am Post subject: |
|
|
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 |
|
Back to top |
|
 |
|