M
michael
Hello,
My apologies for my overtly NEWBIE question. I am a long time C
programmer on various UNIX platforms. I have decided to try my hand at
Microsoft and thought I would try to learn C#.
My project involves accessing an API whish was written in C and
compiled using Visual Studio 6 as an ordinary (old style) DLL. I have
been provided the DLL and corresponding header files.
My project is being developed under Visual C# Express 2005 Beta 2 and I
am relying on the P/Invoke funcationality.
I believe I have correctly created all of the definitions following the
DllImport() rules (including the "unsafe" modifier, etc).
I am able to make function calls to the DLL (I think!) but the function
call is returning an "unknown network error." (I know this because I
have a list of error codes in one of the header files.)
This got me thinking, what happens when that DLL makes another external
function call? In this case, the DLL is using the IP stack of the OS
to communicate a proprietary protocol with an off-site box (which I
cannot access directly).
If I compile this as a ".NET" application, then does that not mean that
all functions (including IP stack) must go through the .NET VM (forgot
what it's called)? Or should access to the IP stack from "old style"
DLLs work anyway?
Any help here is appreciated. Please email me directly or cc: me with
responses.
Thanks!
Michael
My apologies for my overtly NEWBIE question. I am a long time C
programmer on various UNIX platforms. I have decided to try my hand at
Microsoft and thought I would try to learn C#.
My project involves accessing an API whish was written in C and
compiled using Visual Studio 6 as an ordinary (old style) DLL. I have
been provided the DLL and corresponding header files.
My project is being developed under Visual C# Express 2005 Beta 2 and I
am relying on the P/Invoke funcationality.
I believe I have correctly created all of the definitions following the
DllImport() rules (including the "unsafe" modifier, etc).
I am able to make function calls to the DLL (I think!) but the function
call is returning an "unknown network error." (I know this because I
have a list of error codes in one of the header files.)
This got me thinking, what happens when that DLL makes another external
function call? In this case, the DLL is using the IP stack of the OS
to communicate a proprietary protocol with an off-site box (which I
cannot access directly).
If I compile this as a ".NET" application, then does that not mean that
all functions (including IP stack) must go through the .NET VM (forgot
what it's called)? Or should access to the IP stack from "old style"
DLLs work anyway?
Any help here is appreciated. Please email me directly or cc: me with
responses.
Thanks!
Michael