PInvike or Interop resources?

  • Thread starter Thread starter Pat O
  • Start date Start date
P

Pat O

I am writting/maintaining a native library that will be used by .Net
code as well. This is not a COM library. Is there a good source of
information on how PInvoke works with native libraries? I have been
trying things to figure out how they work. I am also wondering if
there is a way to run the native debugger when the starting executable
is a .Net app?

Pat O
Cognex, Corp.
 
Well, do you mean by "how PInvoke works" what actually happens as far as how
the DLL is loaded, when it's loaded, etc. or just how to declare the calls
in your library for managed code to use?

No, there's currently no way to step from the managed debugger into native
code with the Compact Framework.

Paul T.
 
"How it works" is really broad. There are lots of online resources for
everything from basic P/Invoke handling to the more esoteric and complex.
If you have a more specific question we may be able to help.

One that comes to mind (becasue I wrote it) is this one:
http://blog.opennetcf.org/ctacke/PermaLink,guid,4fc2eb64-c1e4-4e10-a441-2a98d5107729.aspx

There is no way to debug stepping across the boundary from the managed to
native debugger. I typically debug one end then the other or use two
instances of Studio, process attachment and DebugBreak calls.
 
I am writting/maintaining a native library that will be used by .Net
code as well. This is not a COM library. Is there a good source of
information on how PInvoke works with native libraries? I have been
trying things to figure out how they work. I am also wondering if
there is a way to run the native debugger when the starting executable
is a .Net app?

Pat O
Cognex, Corp.

Following site is invaluable for pinvoke related information:

http://www.pinvoke.net/index.aspx
 

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

Back
Top