LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

How use variant in Labwindows for TestStand64bit

Hi try to convert a old programme CVI  to 64 bit Edition

 

TS_EngineRegisterUIMessageCallbackEx(gEngine,&errorInfo,(VARIANT)(BANC_TESTSTAND_UIMessageCallback));

 

i dont find the good definition for use the TS_EngineRegisterUIMessageCallbackEx() i think i dont use the good definition for VARIANT

 

Thanks you for your help

0 项奖励
1 条消息(共 2 条)
952 次查看

Hello Lunik,

 

You will find many interesting things to help you with this issue in the following Knowledge Base.  😉

 

I also found some code examples showing the typical structure and definitions :

 

  • For the prototype function: 
    HRESULT TS_EngineRegisterUIMessageCallbackEx(CAObjHandle engineHandle, ERRORINFO *errorInfo, VARIANT callbackFunction);
  • For the callback function: 
    VARIANT callbackVariant;
    VariantInit(&callbackVariant);
    V_VT(&callbackVariant) = VT_DISPATCH;
    V_DISPATCH(&callbackVariant) = (IDispatch*)BANC_TESTSTAND_UIMessageCallback;
    
    TS_EngineRegisterUIMessageCallbackEx(gEngine, &errorInfo, callbackVariant);

I didn't tried them but they seem correct at first sight.

 

With this, you should be able to solve your issue and to convert of your programme CVI. But if you neeed further help, do not hesitate to ask ! 🤠

 

 

P.S. : I just want to draw your attention to certain portions of the code, especially the libraries, which are not always compatible with both 32-bit and 64-bit Editions. This is a well-known issue and you should also check for this, if it was not already done.

0 项奖励
2 条消息(共 2 条)
672 次查看