why 3rd parameter change to char?
-
this is idl declaration: STDMETHOD(ExecVerifygps)(/*[in]*/ BSTR gpsContent, /*[in]*/ short length, /*[out, retval]*/ boolean* flag); this build tli file. inline char IVgps::ExecVerifygps ( _bstr_t gpsContent, short length ) { char _result; HRESULT _hr = raw_ExecVerifygps(gpsContent, length, &_result); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _result; } why 3rd parameter change to char?
alantop
-
this is idl declaration: STDMETHOD(ExecVerifygps)(/*[in]*/ BSTR gpsContent, /*[in]*/ short length, /*[out, retval]*/ boolean* flag); this build tli file. inline char IVgps::ExecVerifygps ( _bstr_t gpsContent, short length ) { char _result; HRESULT _hr = raw_ExecVerifygps(gpsContent, length, &_result); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _result; } why 3rd parameter change to char?
alantop
C doesn't have a native
boolean
type (as used in the IDL), so you need to use some other type that's the same size asboolean
. An IDLboolean
is 8 bits, as is a Cchar
. It would have looked better to usetypedef char boolean;
, 'cause then you could useboolean
in the code. -
this is idl declaration: STDMETHOD(ExecVerifygps)(/*[in]*/ BSTR gpsContent, /*[in]*/ short length, /*[out, retval]*/ boolean* flag); this build tli file. inline char IVgps::ExecVerifygps ( _bstr_t gpsContent, short length ) { char _result; HRESULT _hr = raw_ExecVerifygps(gpsContent, length, &_result); if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this)); return _result; } why 3rd parameter change to char?
alantop