MIDL string
im makin an ALT COM app in C++, and i want a method to accept a vb compatible string. i do this: add method-> HRESULT load([in, string] char* fname);
however, when i compile, i get all sorts of errors... how do u declare a string argument?
First of all, it''s ATL, not ALT. (ALT sounds like a sandwich!)
Strings in COM are of type
codeka.com - Just click it.
Strings in COM are of type
BSTR
. A BSTR
is a unicode string. You can use the ATL class CComBSTR
to make life a bit easier (it''s similar to the MFC CString
class) codeka.com - Just click it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement