convert c++ to C#
-
hi i need to convert the poiners in c++ to C# how can i do it ? for example i have this code in c++ and the main problem is with the *Word i need to use the same funtions (i have dll for the them) but i have problems with the variables or parameters void *StopMemory; int ErrorCode; int LanguageID = 1; int CharCodeID = 1; char *Word = "the"; ErrorCode = ExtrCreateStopMemory(&StopMemory); ErrorCode = ExtrAddStopWord(StopMemory,LanguageID,CharCodeID,(void *) Word); hope somebody will help me thanks eyalso
-
hi i need to convert the poiners in c++ to C# how can i do it ? for example i have this code in c++ and the main problem is with the *Word i need to use the same funtions (i have dll for the them) but i have problems with the variables or parameters void *StopMemory; int ErrorCode; int LanguageID = 1; int CharCodeID = 1; char *Word = "the"; ErrorCode = ExtrCreateStopMemory(&StopMemory); ErrorCode = ExtrAddStopWord(StopMemory,LanguageID,CharCodeID,(void *) Word); hope somebody will help me thanks eyalso
To use pointers in C# you have to put them within a class defined as "unsafe" through the unsafe keyword.
-
To use pointers in C# you have to put them within a class defined as "unsafe" through the unsafe keyword.
-
hi i need to convert the poiners in c++ to C# how can i do it ? for example i have this code in c++ and the main problem is with the *Word i need to use the same funtions (i have dll for the them) but i have problems with the variables or parameters void *StopMemory; int ErrorCode; int LanguageID = 1; int CharCodeID = 1; char *Word = "the"; ErrorCode = ExtrCreateStopMemory(&StopMemory); ErrorCode = ExtrAddStopWord(StopMemory,LanguageID,CharCodeID,(void *) Word); hope somebody will help me thanks eyalso
Marshal, Marshal, Marshal You can use Managed C++ or C++/CLI to wrap the native code or use P/Invoke from C#.