Feature #23
C# support - .net core
Status: | New | Start date: | 02/05/2016 | |
---|---|---|---|---|
Priority: | Low (Code 5) | Due date: | ||
Assignee: | Madars | % Done: | 0% | |
Category: | - | |||
Target version: | - |
History
#1 Updated by Madars about 8 years ago
- Priority changed from Normal (Code 4) to Low (Code 5)
#2 Updated by Madars about 7 years ago
- Subject changed from C#/mono support to C# support - .net core
#3 Updated by Madars over 6 years ago
- File c-callback.tar.gz added
Performed tests with: https://github.com/dotnet/corefx/issues/14540
Attached archive with working code. Basically c# calls C, gives it delegate to call back. I have added extra argument to delegate/callback function:
$ ./run.sh clang++ -shared -fPIC -std=c++11 ./reversepinvokefromthread.cpp -o reversepinvokefromthread.so dotnet run Got here number: 1 Sleeping in Main ... sleeping for 5 sec ... ... after sleep trying to callback from new thread .. 0x7fa8dd6c307c Got here number: 2 sleeping for 5 sec .
See c-callback.tar.gz, just run.sh (it will export library path and run off make) and run off the test.