Using API calls in VS2008

Discussion created by deonpienaar on Jul 15, 2009
Latest reply on Jul 20, 2009 by andreas



I have been struggling for some time with using API calls in VS2008. I would like to use the pisn_putsnapshot function in the API to send values to the PI UDS server. The main reason I am not using the SDK is that I would like the value to be buffered. The following is giving me a headache


I have take the piapi32.bas file and converted this to a com dll in VS2008. I then created a TestApi app to test the class. I am able to reference the class functions in the application. Once I run the app I get a "Arithmetic operation resulted in an overflow" error on the line that calls the pisn_putsnapshot function. I have also tried compiling the piapi32.bas as a normal dll but get a "Unable to find entry point in dll "dll name" to function "function name".


If someone out there has struggled with the same issue and knows what I am doing wrong please let me know. It will be greatly appreciated