Solved

CString have a diffrent behaviour

Posted on 2002-03-06
5
180 Views
Last Modified: 2013-11-20
I have a mfc dll source code in vc++.
my dll use a CString variable.
when i write that variable in a binary file
the buffer have some 0(null) character.
for example if my CString variable would "TEST"
the data writen to file is
'T' 0 'E' 0 'S' 0 'T' 0 0 0

but where I do simular work in my mfc project the data writen to file is
'T' 'E' 'S' 'T'

please help me
0
Comment
Question by:javadp
5 Comments
 
LVL 12

Expert Comment

by:migel
ID: 6846580
Hi!
Check you use right DLL may be you use UNICODE dll with ANSI exe???
<hmmm how it possible???>
0
 
LVL 12

Accepted Solution

by:
migel earned 50 total points
ID: 6846581
Hi!
Check you use right DLL may be you use UNICODE dll with ANSI exe???
<hmmm how it possible???>
0
 
LVL 7

Expert Comment

by:peterchen092700
ID: 6846782
it's definitely a UNICODE build of the DLL.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6877602
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.11441638.html
http://www.experts-exchange.com/questions/Q.11464718.html
http://www.experts-exchange.com/questions/Q.20003263.html
http://www.experts-exchange.com/questions/Q.20003291.html
http://www.experts-exchange.com/questions/Q.20004596.html
http://www.experts-exchange.com/questions/Q.20004598.html
http://www.experts-exchange.com/questions/Q.20083504.html
http://www.experts-exchange.com/questions/Q.20089543.html
http://www.experts-exchange.com/questions/Q.20089544.html
http://www.experts-exchange.com/questions/Q.20093071.html
http://www.experts-exchange.com/questions/Q.20102935.html
http://www.experts-exchange.com/questions/Q.20104815.html
http://www.experts-exchange.com/questions/Q.20106878.html
http://www.experts-exchange.com/questions/Q.20113618.html
http://www.experts-exchange.com/questions/Q.20114035.html
http://www.experts-exchange.com/questions/Q.20125872.html
http://www.experts-exchange.com/questions/Q.20134344.html
http://www.experts-exchange.com/questions/Q.20144267.html
http://www.experts-exchange.com/questions/Q.20153424.html
http://www.experts-exchange.com/questions/Q.20154677.html
http://www.experts-exchange.com/questions/Q.20155179.html
http://www.experts-exchange.com/questions/Q.20177633.html
http://www.experts-exchange.com/questions/Q.20181455.html
http://www.experts-exchange.com/questions/Q.20181839.html
http://www.experts-exchange.com/questions/Q.20186426.html
http://www.experts-exchange.com/questions/Q.20188240.html
http://www.experts-exchange.com/questions/Q.20227524.html
http://www.experts-exchange.com/questions/Q.20230698.html
http://www.experts-exchange.com/questions/Q.20239968.html
http://www.experts-exchange.com/questions/Q.20251059.html
http://www.experts-exchange.com/questions/Q.20253443.html
http://www.experts-exchange.com/questions/Q.20256439.html
http://www.experts-exchange.com/questions/Q.20274261.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.11008242.html
http://www.experts-exchange.com/questions/Q.20089763.html
http://www.experts-exchange.com/questions/Q.20106021.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 6972692
Comment from expert accepted as answer.

Computer101
E-E Moderator
0

Featured Post

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

777 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