How Could I use C APIs with different DataType??
I know we could use a c API-functions by DllImport attribute,
but there may be some problems.
for example if the c API has a parameter with unsigned char DataType,
However,there is no such datatype in c#,
another example,if the c API has a parameter with 8-bits char,
However,the char DataType in c# is 16-bits.
how could i do when i meet these situations??
I also know we could use MarshalAs attribute with UnmanagedType enum to solve these problems,but could you give me a clear answer to above questions?
I want to use AsAny in UnmanagedType enum,I think it would works ok, Could it??