Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hiya all,
got a problem: a VC++ compiled dll accepts a ByteBuffer allocated variable as input (and sets all Bytes values during its execution) in a JAVA program. Now I need to use the same dll processing result within a C# program, but any attempt to do the external call gives me a System.accessviolationerror: attempt to read/write from a protected memory location. May anyone give me an help? I got neither documentation nor source code for the dll, obviously, just the JAVA calling which correctly works..
Thank u all.
Giuseppe
Posted

1 solution

you can use a System.IO.MemoryStream and put all your values to it MemoryStream.Write and convert it to array like
byte[] input = MemoryStream.ToArray();
if you could post the vc++ method prototype / some details it will be easy to answer
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900