Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use niScope API with "pointer to function"

excuse me

 

I want to call niScope API in Visual C++6.0 Platform

 

Direct to use API of niScope , this way is normal

 

but , I want to create a "function pointer" by myself ,  and let this pointer point prototype of niScope API

 

this way has some error message from Visual C

 

My simple Code :

 ViStatus (*pFunction)(ViSession );
 pFunction=niScope_Abort;
 

 

Error Message :

E:\Test_Scope\Main.cpp(32) : error C2440: '=' : cannot convert from 'long (__stdcall *)(unsigned long)' to 'double (__cdecl *)(int *)'
        This conversion requires a reinterpret_cast, a C-style cast or function-style cast

 

I guess, problem key is _stdcall & _cdecl

 

please give me some suggestion & ideal , thanks!

 

 

0 Kudos
Message 1 of 1
(5,903 Views)