0

So I've now progressed to having an almost functioning wrapper.
Other posts regarding my wrapper issues are:
C# wrapper and Callbacks &
C# wrapper for array of three pointers

I use the wrapper to establish a connection to the Dallmeier using the following:

_dallmeier.SessionHandle = DallmeierSDK.dlm_connect(_handle, _ip, "", _pass, null, null, connectionCallback, pInPut)  

This returns the session handler. After awhile I get a AccessVoilationException about attempted to read or write protected memory.

I think this has something to do with using Marshal.Read and/or Marshal.Copy (as stated in one of the posts above) but I'm not sure where I use these commands.

Can some please advise me on this and/or examples?

1 Answer 1

1

maybe you could try wrapping your code in a fixed block, to prevent moving the pointer in memory or being GC-collected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.