c# - Platform invoke #define directive -


i trying understand platform invokes. so, understood many concepts how can invoke #define directives in c#.

example:

in c++ side have this:

#define dont_care_how_you_invoke_me (ptr)    

i've tried this:

[dllimport("mydll.dll")] static extern void dont_care_how_you_invoke_me(intptr ptr); 

this didn't work. i've searched on google while , couldn't find i'm not sure if possible or not.

thanks in advance

pinvoke imported methods in c# correspond actual exported functions in dll, not c/c++ syntactical representation of function (which why use name-mangling when dealing member functions in c++)

instead of using c/c++ header file reference functions, use tool see functions being exported dll , use names directly.

a tool dependency walker: http://www.dependencywalker.com/


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -