Re: Newbie adding COM components to a project
This is the lines around line number 7211:
struct __declspec(uuid("914b06bd-7e4c-11d2-bcef-00e0290e1347"))
IBBQueryRow : IDispatch
{
//
// Property data
//
__declspec(property(get=GetInstanceHandle))
long InstanceHandle;
__declspec(property(get=GetField,put=PutField))
_variant_t Field[];
__declspec(property(get=GetFieldName))
_bstr_t FieldName[];
__declspec(property(get=GetFieldCount))
long FieldCount;
__declspec(property(get=GetBOF))
VARIANT_BOOL BOF;
__declspec(property(get=GetEOF))
VARIANT_BOOL EOF;
__declspec(property(get=GetRowNum))
long RowNum;
__declspec(property(get=GetQueryName))
_bstr_t QueryName;
__declspec(property(get=GetQueryID))
long QueryID;
__declspec(property(get=GetQueryType))
enum bbQueryTypes QueryType;
//
// Wrapper methods for error-handling
//
VARIANT_BOOL GetEOF ( );
VARIANT_BOOL GetBOF ( );
long GetFieldCount ( );
_bstr_t GetFieldName (
const _variant_t & Index );
void PutField (
const _variant_t & Index,
const _variant_t & __MIDL_0404 );
_variant_t GetField (
const _variant_t & Index );
long GetInstanceHandle ( );
HRESULT StopCallingMacro ( );
long GetRowNum ( );
_bstr_t GetQueryName ( );
long GetQueryID ( );
enum bbQueryTypes GetQueryType ( );
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall get_EOF (
/*[out,retval]*/ VARIANT_BOOL * __MIDL_0399 ) = 0;
virtual HRESULT __stdcall get_BOF (
/*[out,retval]*/ VARIANT_BOOL * __MIDL_0400 ) = 0;
virtual HRESULT __stdcall get_FieldCount (
/*[out,retval]*/ long * __MIDL_0401 ) = 0;
virtual HRESULT __stdcall get_FieldName (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ BSTR * __MIDL_0402 ) = 0;
virtual HRESULT __stdcall put_Field (
/*[in]*/ VARIANT Index,
/*[in]*/ VARIANT __MIDL_0404 ) = 0;
virtual HRESULT __stdcall get_Field (
/*[in]*/ VARIANT Index,
/*[out,retval]*/ VARIANT * __MIDL_0404 ) = 0;
virtual HRESULT __stdcall get_InstanceHandle (
/*[out,retval]*/ long * __MIDL_0405 ) = 0;
virtual HRESULT __stdcall raw_StopCallingMacro ( ) = 0;
virtual HRESULT __stdcall get_RowNum (
/*[out,retval]*/ long * __MIDL_0406 ) = 0;
virtual HRESULT __stdcall get_QueryName (
/*[out,retval]*/ BSTR * __MIDL_0407 ) = 0;
virtual HRESULT __stdcall get_QueryID (
/*[out,retval]*/ long * __MIDL_0408 ) = 0;
virtual HRESULT __stdcall get_QueryType (
/*[out,retval]*/ enum bbQueryTypes * __MIDL_0409 ) = 0;
};
Line 7211 (where is complains about a '-' sign is:
VARIANT_BOOL EOF;
Line 7319 is the same.
Again, thanks for any help. I can supply you with the whole tlh file if
it is easier but it is over 3Mb so I won't post it here!
Thanks
David
Stuart Redmann wrote:
zeidman@hotmail.com wrote:
OK, I realise the stupid mistake I was making. I was doing an include
on the tlb and not import.
However when I now do import I still get the following errors. Does
anybody have any thoughts?
c:\documents and settings\david\my documents\visual studio
2005\projects\testproj\testproj\debug\bbreapi7.tlh(7211) : error C2059:
syntax error : '-'
[snipped the rest of the error messages]
That certainly seems strange to me that the generated type library
header should contain a minus out of place (all minus signs should
appear either in comments or in the uuid-annotations). Could you post us
the offending lines of bbreapi7.tlh, or is this confidential information?
Stuart