type mismatch
-
I have a method in a activeX dll ( created in VB) My program is in VC6: I used #import to link with the DLL.
virtual HRESULT __stdcall TimeZone ( BSTR mstrPlant, long mlngTime, long * mlngTimeDifference, enum ConneBD enmConneBD, struct _clsErr * * _arg5 ) = 0;
It is declared like that in .tlh I call it this way:time_t *ltime; long * timeDiff; ltime = new time_t(); timeDiff = new long(); *ltime = 0; *timeDiff = 0; time( ltime ); struct _clsErr *m_E; hresult = m_t->TimeZone(OLESTR"01"),*ltime,timeDiff,BD_OR,&m_E);
hresult tells me that every thing worked fine but timeDiff return empty. I get "type dismatch" from the struc _clsErr.. My parameter's types seem ok.. Can somebody see what I'm doing wrong? thanks, Lily -
I have a method in a activeX dll ( created in VB) My program is in VC6: I used #import to link with the DLL.
virtual HRESULT __stdcall TimeZone ( BSTR mstrPlant, long mlngTime, long * mlngTimeDifference, enum ConneBD enmConneBD, struct _clsErr * * _arg5 ) = 0;
It is declared like that in .tlh I call it this way:time_t *ltime; long * timeDiff; ltime = new time_t(); timeDiff = new long(); *ltime = 0; *timeDiff = 0; time( ltime ); struct _clsErr *m_E; hresult = m_t->TimeZone(OLESTR"01"),*ltime,timeDiff,BD_OR,&m_E);
hresult tells me that every thing worked fine but timeDiff return empty. I get "type dismatch" from the struc _clsErr.. My parameter's types seem ok.. Can somebody see what I'm doing wrong? thanks, Lily