Solved

Converting DSP's from WIN32 to Unicode

Posted on 2003-11-04
8
311 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

808 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