04-17-2013 06:25 AM
I am using an activex control- I used server conversion, which displays graphics.....the control originates from VB
Below is what I an trying to use:
1)tmp = CableEyeCtl_NewICableGfx (NULL, 1, LOCALE_NEUTRAL, 0, &CabGfx); ---->tmp = 0
2)HR = CA_GetInterfaceFromObjHandle (Cabcon, &CableEyeCtl_IID_ICableCx, 0, &sourceIUnknown, 0); ---->Hr=0
3)tmp = CableEyeCtl_SetICableGfxProperty (CabGfx, NULL, CableEyeCtl_ICableGfxCable, CAVT_UNKNOWN,sourceIUnknown); ----> tmp = 0
This does nothing....
I am not sure what to put into argument 5 of funtion 3 so I was trying 2).
Here is some more info:
HRESULT CVIFUNC CableEyeCtl_NewICableGfx (int panel, const char *label, int top,
int left, int *controlID,
int *UILError)
{
HRESULT __result = S_OK;
int ctrlId;
GUID clsid = {0x5A42E23B, 0xCC98, 0x4FA5, 0x9F, 0xEF, 0x6, 0xE, 0x5A, 0xFF,
0x6A, 0xFF};
const char * licStr = "005847\\Cimbian/Siemens\\12-Apr-2013\\232P0-56H0C-RK036-PV338-02PP1";
ctrlId = NewActiveXCtrl (panel, label, top, left, &clsid,
&CableEyeCtl_IID_ICableGfx, licStr, &__result);
__ActiveXCtrlErrorHandler();
return __result;
}
HRESULT CVIFUNC CableEyeCtl_SetICableGfxProperty (CAObjHandle objectHandle,
ERRORINFO *errorInfo,
unsigned int propertyID,
unsigned int propertyType, ...)
{
HRESULT __result = S_OK;
va_list args;
va_start (args, propertyType);
__result = CA_PropertySetVEx (objectHandle, errorInfo, 0, propertyID,
propertyType, args);
va_end (args);
return __result;
}
I am may be using the wrong handle and IID...but I am not sure if I am on the right path with function 3) argument 5.
Can anyone help?
04-22-2013 06:59 AM
Hi Slten,
I have a few questions:
James O
04-22-2013 07:59 AM
1) I am trying to understand the functions and get them to work....They are to control a graphics control that work in Visual Basic
2) They will return Zero, but still not work
3) Argument 5 is the 5th placeholder in the function CAVT_UNKOWN
4) The code is originally an ActiveX cableEye control it is converted into an instrument driver by NI ActiveX Server wizard.
06-10-2013 04:46 AM
The VB equivalent is
CabGfx.Cable = CabCtl.DiffData