D:/Zythum/DinoKod/Common/Util.cpp

00001 //---------------------------------------------------------------------------------------------
00002 //      This file is a part of "DinoKod".
00003 //      Copyright © 2003 Dino Productions. All Rights Reserved.
00004 //      
00005 //      File                    : Util.cpp
00006 //      Author                  : Sebastien LEIX        sebastien.leix@wanadoo.fr
00007 //      Date                    : 
00008 //      Modification    :
00009 //
00010 //---------------------------------------------------------------------------------------------
00011 #include "Common/Util.h"
00012 
00013 void ConvToAnsi( WCHAR* pWideStr, char* pString );
00014 void ConvToUnicode( char* pString, WCHAR* pWideStr);
00015 
00016 //---------------------------------------------------------------------------------------------------------------------
00017 void ConvToAnsi( WCHAR* pWideStr, char* pString )
00018 {
00019         WideCharToMultiByte(    CP_ACP,
00020                                                         0,
00021                                                         pWideStr,
00022                                                         -1,
00023                                                         pString,
00024                                                         (int)wcslen( pWideStr ),
00025                                                         NULL,
00026                                                         NULL );
00027         pString[ wcslen( pWideStr ) ] = '\0';
00028 }
00029 
00030 //---------------------------------------------------------------------------------------------------------------------
00031 void ConvToUnicode( char* pString, WCHAR* pWideStr)
00032 {
00033         MultiByteToWideChar(    CP_ACP,
00034                                                         0,
00035                                                         pString,
00036                                                         -1,
00037                                                         pWideStr,
00038                                                         (int)strlen( pString ) * 2 );
00039 }
00040 

Generated on Sun Mar 25 20:02:11 2007 for Zythum Project by  doxygen 1.5.1-p1