Skip to main content
gamedev.net
🔒 Locked

MIDL string

Started by disjunction Jul 27, 2002 at 11:37 PM 0 replies 750+ views
Original Post
disjunction
disjunction
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?
Dean Harding
Dean Harding
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.