Interfacing IDL and COM objects [message #79929] |
Fri, 13 April 2012 07:15 |
rohit bhat
Messages: 4 Registered: August 2011
|
Junior Member |
|
|
Hi,
I was trying to interface Import a COM object into IDL. I have no
knowledge of COM but I do have the source code with me.
There are a few methods defined with the keywords [propput]. I used
IDL's SetProperty method and it worked on them.
Then there are few methods that have nothing defined in them . Eg:
GetInfo( In nIndex, BSTR _RPC_FAR *pStudy_Info )
where Study_Info is a structure that has fields like
{
int nIndex
char Pname[128]
char Date [32]
int Status
char Description[128]
char ID[128]
}
When I call this method in IDL, using Obj -> GetInfo, 0l, S
1. Error when I put S as "structure", "pointer to a structure" on the
IDL side
2. Nothing returned when S is a "string", "byte" on the IDL side
Does the presence of keywords like [retval], [in] make it easier for
IDL to interface with COM?
or
Is it that IDL does not understand the datatype that COM sends? (non-
compatibility with structures, pointers, strings)
Please let me know.
Thanks,
Rohit
|
|
|