468,504 Members | 1,986 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,504 developers. It's quick & easy.

OLE2T macro in VC++

Hi all,

First of all I am not sure whether this is a right place to post this question or not.

I am working on one application (under VC++6.0) in which I need to use the following statement:

MyFun( (LPCTSTR)t1, (LPCTSTR)t2, OLE2T(V_BSTR(&t3)));

but VC++6.0 throws an error
>error C2065: 'OLE2T' : undeclared identifier

I have already defined _UNICODE in my preprocessor settings.The same thing is working fine in VC++7.0 environment.

I also tried by using " USES_CONVERSION;" macro but then I also get the following error

>error C2065: 'USES_CONVERSION' : undeclared identifier
>error C2065: 'OLE2T' : undeclared identifier

Can anyone help me on this?

Thanks in advance !
Dec 4 '07 #1
1 8219
weaknessforcats
9,207 Expert Mod 8TB
OLE2T is an ATL string conversion macro. Most of the ATL macros are in AfxPriv.h. Most likely you will need MFC also.

BTW, what's the (LPCTSTR)t1, (LPCTSTR)t2 typecast all about????? Typecasting to a PCHAR does not make a PCHAR string. What is it you are really trying to do?
Dec 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by foo | last post: by
21 posts views Thread by Eric | last post: by
4 posts views Thread by Andrew Kibler | last post: by
3 posts views Thread by songie D | last post: by
17 posts views Thread by sounak | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.