Please Help : Marshalling in C#?
-
Dear All, I have the following issue... I need to call a function from an unmanaged dll... One of its input parameters is described as follows; CvContourRetrievalMode as the datatype name and it takes one of four values{CV_RETR_TREE...etc} so shall I define it as enum or what?in msdn I found only examples for strings,structs and classes?any suggestions? Thanks and Best Regards, E.A.
-
Dear All, I have the following issue... I need to call a function from an unmanaged dll... One of its input parameters is described as follows; CvContourRetrievalMode as the datatype name and it takes one of four values{CV_RETR_TREE...etc} so shall I define it as enum or what?in msdn I found only examples for strings,structs and classes?any suggestions? Thanks and Best Regards, E.A.
An enum will work fine. The important bit is that your datatype is the same size as the expected datatype. xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
-
Dear All, I have the following issue... I need to call a function from an unmanaged dll... One of its input parameters is described as follows; CvContourRetrievalMode as the datatype name and it takes one of four values{CV_RETR_TREE...etc} so shall I define it as enum or what?in msdn I found only examples for strings,structs and classes?any suggestions? Thanks and Best Regards, E.A.
Look at http://www.pinvoke.net/default.aspx/Enums.DFS_VOLUME_STATE[^] This an example may be help tou to convert your enum If you look at the left side from this page you will see many Enums you can look at them MCAD