🔀 Between unmanaged C++ / C# / Java /... Complex types and Strings. [Part-2]
Channel: Denis Kuzmin
Date: 2018-03-31

Do NOT combine unnecessary code, please turn ON your brains [both host sides - CLR/Native/JVM]. /This is Part 2. C++, C# and Java. Chapters:

00:10 - Passing Unicode strings from C# to unmanaged C++ ((host side)).
        Samples for arguments and for the return value.
        
05:21 - Passing complex types from C# to unmanaged C++ ((host side)).
        Samples for structures.

08:42 - Passing arrays from unmanaged C++ ((host side)) to C#.

11:33 - By the way, How to debug at runtime both managed + unmanaged environments.
        ~(.NET Clr & native unmanaged C++)
        
12:38 - Passing multidimensional arrays from C++ ((host side)) to C#.
        
14:22 - Passing Unicode strings from C++ to C# ((host side)).

16:23 - Passing complex types from C++ to C# ((host side)).
        Samples for structures.

20:50 - An alternative. Native C/C++ structures without declaration. Manual accessing at runtime.
        
22:47 - Passing arrays to C# from Java ((host side)).
        Do it anywhere.

27:42 - ED.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
@ 24:00 just because of PI day a little before: https://plus.google.com/+DenisKuzmin3F/posts/hZn2fkyDbp4
- - -
@ 24:34 just for fun, I mean, how it can be also without information about size. Think different.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - - - -
- - -

* Conari:                 https://github.com/3F/Conari
* JNA:                     https://github.com/java-native-access/jna
* .NET DllExport:   https://github.com/3F/DllExport

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Find code from this screencast and my other related complete project examples (full source code)  including for modern .NET Core:

📑 https://github.com/3F/DllExport/wiki/Examples
👉🧪 https://github.com/3F/Examples/tree/master/DllExport/BasicExport

📑 https://github.com/3F/Conari/wiki/Quick-start


⚠ ⚠ ⚠

Please use my Complete Project Examples if you are not sure about minimal good practice because this screencast not for learning programming!

Means this is not tutorial for how this should be in your production code! And this is not step-by-step tutorial for beginners.

Like you need additional checks for results etc, you also need to use some additional good practice when designing your final logic. 

You need always use some decomposition of any complex logic, and try to apply some related behavioral design pattern, and much more.

Also please note, again, this screencast combines several methods at once (for both host sides - CLR/Native/JVM). This is not only about exporting from .NET (dllexport), Do not try to combine unnecessary code, and so on. Please look detailed chapters with description.

▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ ▒░ 



📢 Watch the [ Part-1 ]

    Managed & Unmanaged PInvoke. C++ and C#
    https://www.youtube.com/watch?v=9Hyg3_WE9Ks

Don't forget to look the domains and reference assembly instead of this features if you're using managed C++ (on CLR) together with C# because probably this way is better for you.


~ ~ ~
By the way, a true background music (because I listened this while recording), here:
* https://youtube.com/watch?v=HlhA5q6Fjc0&list=PLA6G9O8_L369MqTvnWc7DMvp458LLBwbe&index=20

    # 20-22 from playlist:
    https://www.youtube.com/playlist?list=PLA6G9O8_L369MqTvnWc7DMvp458LLBwbe

:p


= = = = = = = =
* https://github.com/3F
* https://twitter.com/github3F
* https://youtube.com/reg3F




About Video Quality
- - - - - - - - - - - - - - - - -
The original video does not contain any or at least most of the observable artifacts like here on youtube.

Moreover, only recently these artifacts became even more and even the picture became more blurry. Looks like someone wants to free up more space in own data centers using double/triple/... compression methods on the second/third round at least for old non-popular uploads. Ask google including for everything in [About] section from this channel; not me; Also try manual 1080p not Auto.