Passing a Hashtable to Unmanaged Code Using Interop

How to pass HashTableto .net in C ++ using interop?

I know how to pass primitive types, but I need to know how to pass others.

+3
source share
2 answers

You cannot pass the whole object that will be used as a hash table in C ++. P / invoke translates the .NET type into a C ++ type that it can understand. For example, it is Stringconverted to LPWSTR( wchar_t *). However, he cannot transform something like HashSetthat in this way.

+4
source

You can not.

++, Hashtable ( void*, )

++ struct hashtable, struct #, struct.

0

Source: https://habr.com/ru/post/1773612/


All Articles