GPAptiva

GPAptiva

  • NA
  • 2
  • 0

Wrapping unmanaged variables from an unmanaged DLL

Nov 17 2004 11:46 PM
Hi. I have a question. How do I wrap a variable from an unmanaged DLL? For example, let's say that the DLL contains the two variables: // C++ int myFirstVariable; int mySecondVariable; Now this is going to be a little off-topic and not related to my thread about getting the variables from an unmanaged DLL... For those of you who want to know how to call an unmanaged function like MyFunction() (a BOOL type) from an unmanaged DLL, all you have to do is this: [DllImport("MyDLl.dll")] private extern Boolean MyFunction(); Now, other than that, how do I get (wrap) an unmanaged variable from an unmanaged DLL?

Answers (1)