Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLLExport Example with by-ref parameters #5

Closed
Markus1980Wien opened this issue Nov 20, 2020 · 1 comment
Closed

DLLExport Example with by-ref parameters #5

Markus1980Wien opened this issue Nov 20, 2020 · 1 comment

Comments

@Markus1980Wien
Copy link

Can you please provide an example where a complex type or an arrary of complex types is handed to c# by ref.

Unmanaged code (c++) creates a complex type and fills this type with some data.
Unmanaged code calls an c# Function and hands over the complex type.
c# Reads the data that has been provided by unmanaged code.
c# Modifies the data and hands back the modified data to unmanaged code.
Unmanaged code (c++) uses the data which has been modified by c#.

@3F
Copy link
Owner

3F commented Nov 23, 2020

Use IntPtr > Between unmanaged C++ / C# / Java /... Complex types and Strings. [Part-2]

+
3F/Conari#2

dlr.somefunc<int>(ref cid, out data);
l.bind<FuncRef4<AVCodecContext, AVPacket, AVFrame, int, int>>("avcodec_encode_audio2")(c, pkt, frame, ref output);

@3F 3F closed this as completed Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants