473,383 Members | 1,792 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 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 8761
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.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.