MIDL string

Started by
0 comments, last by disjunction 21 years, 8 months ago
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?
Advertisement
First of all, it''s ATL, not ALT. (ALT sounds like a sandwich!)

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