I'm still struggling with the syntax under MS6.0. I'm using the CW tools so I have to use variants. When I say:
CCWAOPoint m_analog;
m_analog.SingleWrite(5.0);
I get the error message (SingleWrite takes more then 1 parameter.)
So I try:
COleVariant vOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
m_analog.SingleWrite(5.0,vOptional);
and I get
"Can't convert parameter 1 from const double to const struct tagVARIANT &. How do I create a struct tagVARIANT &? I just want to output 5.0V to my NI PXI card.
What really is a variant? I see that Microsoft has some ideas about what they are and that NI has a class to try and handle them better but I don't appreciate what they are for. Do I reall
y need to use a scale factor for my second parameter in SingleWrite? Any help would be great.
Grant
Grant M. Johnson
Project Engineer
LECO Corporation