I am attempting to use C# to write a small application that can connect to a CR3000 datalogger. I have been able to load the dll and use some of the functions. I can use OpenIPPort() and CloseIPPort() just fine. When I try to use a function with a 'return_data' parameter is where I start having problems. For Example GetStatus(pakbus_address, device_type, return_data, return_data_len).
Is there some example code somewhere or could someone explain to me how to access the data returned from functions that use return_data and return_data_len in C#?
Thanks
A GetStatus command and many other commands are used in the C++ and MSC++ project examples installed in C:\Campbellsci\BMP5DirectSDK\Examples
As return_data and return_data_len will hold the result on success you should try to pass the input arguments by reference.
In C# something like:
GetStatus(pakbus_address, device_type, ref return_data, ref return_data_len)
artmann
do you have an example in C#? Could you plese send me?
thanks