472,958 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

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 8689
weaknessforcats
9,208 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

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

Similar topics

2
by: foo | last post by:
I'm creating a debug class called debug_mem_allocation for the purpose of finding memory leaks. I used macro's to replace the new and delete operators. My problem is with trying to replace the...
21
by: Eric | last post by:
Hello all, I've got this line of given code (cannot change this; wizard-generated, but value may change someday): #define IDB_BUTTON 225 Somewhere in the code I found /...
4
by: Andrew Kibler | last post by:
Two sections of code, in the first one fwrite works, in the second one it doesn't (ms VC++) both are identical except in the working one fseek is used twice to set the file pointer, once just...
5
by: rachelm81 | last post by:
Hello, all! I'm creating a macro for help with some c/c++ projects, and within it, I'm trying to execute Find/Replace. Actually, it's executing fine. It's closing the prompt that I'm having a problem...
4
by: Garry Freemyer | last post by:
I'm trying to convert this macro to a c# function but I have a big problem. It's on the LEFT side of an assignment statement and I am extremely flustered over this one because I'm a little rusty...
3
by: songie D | last post by:
would it be possible to sort of engineer some sort of preprocessor macro that does a 'for' loop. i.e. for where you would normally use a normal for loop, but when it is known ay compile time whay...
1
by: Ian | last post by:
I have just begun to to learn how to write macros in VC++. For learning purposes, I would like to implement a macro that accesses all files in a 'test' project and makes a series of changes to...
17
by: sounak | last post by:
How could we get a macro name from a macro value such that in a header file #define a 100 #define b 200 now the source file will be such that the user gives 100 then the value is outputted as...
1
by: Ed | last post by:
Hi, guys, One question block me. I want to know current Visual Studio version, "vc80" or "vc90" in Build Event. Can I use some macro in Build Event to get it? Thanks a lot! Ed.
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.