- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to add C++ data xfer into existing C# code?
For example, existing C# code is:
outEndpoint.XferData(ref buf, ref len, true);
But use C# to load/process data before sending them is slow.
What is needed is a C++ method to be called through P/Invoke to do the data load and send job.
The problem is how to get the C++ CCyUSBEndPoint corresponding to the C# outEndpoint? What handle to pass to the C++ P/invoke method?
The C++ examples looks strange, are they C++/CLI code?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The C++ CyAPI.lib is a static library and P/Invoke is used to import a .dll dynamic link unmanaged library into your managed code.
We have not used CyAPI.lib in C# before as we have two different completely functional library for the two programming languages.
Please refer to this link which may be of help: https://stackoverflow.com/questions/2958416/call-c-library-from-c-sharp
Thanks,
Yatheesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The C++ CyAPI.lib is a static library and P/Invoke is used to import a .dll dynamic link unmanaged library into your managed code.
We have not used CyAPI.lib in C# before as we have two different completely functional library for the two programming languages.
Please refer to this link which may be of help: https://stackoverflow.com/questions/2958416/call-c-library-from-c-sharp
Thanks,
Yatheesh