Solved

Converting DSP's from WIN32 to Unicode

Posted on 2003-11-04
8
299 Views
Last Modified: 2007-12-19
Hello,
     I am trying to convert two projects from WIN32 to unicode. The two projects depend on a library that already builds in Win32 Unicode Debug successfully. I'm trying to convert the other two projects over and its not going very well. Here are some of the errors I am getting::::

c:\program files\microsoft visual studio\vc98\atl\include\atlconv.h(125) :
error C2440: 'return' : cannot convert from 'const char *' to 'const unsigned short *'

c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(5031) :
error C2440: 'initializing' : cannot convert from 'unsigned short [25]' to 'const char []'

....I have a lot of errors but they all seem to involve the converting of arrays, and they are all in those two header files............

I believe my problem is the compiler can't find the USES_CONVERSTION macro but im not 100% positive.

IF anyone has a solution or can re-direct me towards some helpful documentation (I cannot seem to find any) I would appreciate it.

Thanks A lot,
    misiti3780
0
Comment
Question by:misiti3780
8 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 125 total points
ID: 9680253
Do you use

#define _UNICODE

or have that macro set in your project settings?
0
 

Author Comment

by:misiti3780
ID: 9680355
I have it set in my project settings but I dont use it in my code.
0
 
LVL 86

Expert Comment

by:jkr
ID: 9680417
Are you using

#define UNICODE

in the settings or the code also?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:misiti3780
ID: 9681355
the errors are occuring with the inline functions within atlbase.h and another file. the functions that are failing are within #define _UNICODE ....but I myself only include the _UNICODE in my project->preprossor settings...not in my code
0
 

Author Comment

by:misiti3780
ID: 9681367
on a side note....only some of the inline functions that are failing from atlbase.h are actually be called in my application...aka functions that are NOT being called on are stilling failing...that might have something to do their inline decleration though.....
0
 
LVL 3

Assisted Solution

by:Madz
Madz earned 125 total points
ID: 9693375
Try defining UNICODE, _UNICODE and FORCE_UNICODE macros in your c/c++ defines

Madz
0
 
LVL 9

Expert Comment

by:tinchos
ID: 10242517
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Split: jkr {http:#9680253} & Madz {http:#9693375}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now