serhiy
Jan 4th, 2001, 02:09 AM
Goodday everybody...
Situation:
I created a project using ATL COM AppWizard. In the project, I created a ATL object called "VehicleDBManager".
Problem:
I want to creat a method for that ATL object which is:
HRESULT ReadVehicleTable([in] int nStatementId, [in] CString szParameterList, [in] _RecordsetPtr& pRecordset, [out] BOOL *ReturnVal)
but when I try to compile the project, the compiler prompts me the following error:
C:\Pims-Program\DBManager\DBManager.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
Question:
Why I got this problem? Is it because I can't use CString data type, which is a MFC data type, when declaring the method? I try to change it to char* data type and it works, but the next error occur:
C:\Pims-Program\DBManager\DBManager.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "_RecordsetPtr"
So, what should I do to solve this problem? Is it because of MFC or ...? Hopefully the solution won't have to be changing the data type. An explanation of why do this thing happen and solution will be most welcome.
Your help will be most appreciated...
P/S: By the way, I'm new to the world of COM and ATL.
Situation:
I created a project using ATL COM AppWizard. In the project, I created a ATL object called "VehicleDBManager".
Problem:
I want to creat a method for that ATL object which is:
HRESULT ReadVehicleTable([in] int nStatementId, [in] CString szParameterList, [in] _RecordsetPtr& pRecordset, [out] BOOL *ReturnVal)
but when I try to compile the project, the compiler prompts me the following error:
C:\Pims-Program\DBManager\DBManager.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
Question:
Why I got this problem? Is it because I can't use CString data type, which is a MFC data type, when declaring the method? I try to change it to char* data type and it works, but the next error occur:
C:\Pims-Program\DBManager\DBManager.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "_RecordsetPtr"
So, what should I do to solve this problem? Is it because of MFC or ...? Hopefully the solution won't have to be changing the data type. An explanation of why do this thing happen and solution will be most welcome.
Your help will be most appreciated...
P/S: By the way, I'm new to the world of COM and ATL.