Solved

CString have a diffrent behaviour

Posted on 2002-03-06
5
177 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
Comment Utility
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
Comment Utility
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
Comment Utility
it's definitely a UNICODE build of the DLL.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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
Comment Utility
Comment from expert accepted as answer.

Computer101
E-E Moderator
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

16 Experts available now in Live!

Get 1:1 Help Now