BSTR or Structure ?
-
I have to pass a lot of parameters to and from my COM in one function. What would the better to use a BSTR string or to pack them into a structure? If a structure, could anyone sent an example how to use a pointer to the structure in IDL design. Thanks.
-
I have to pass a lot of parameters to and from my COM in one function. What would the better to use a BSTR string or to pack them into a structure? If a structure, could anyone sent an example how to use a pointer to the structure in IDL design. Thanks.
Hi, You have an option of passing all the parameters as SafeArray of bytes or you can use the wrapper COM object for the parameters. The second approach is much easier to use but it cost time to create/destroy extra object. As for me if I don't call the function too often I prefer to use a special object for passing parameters. There is an article in MSDN "OLE Q&A" by Don BOX which has more details on the topic... Regards, Alex Gorev, Dundas Software.