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 pointersI 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?
maybe you could try wrapping your code in a fixed
block, to prevent moving the pointer in memory or being GC-collected.
精彩评论