工程设置是非Unicode的,下面是读取时用的代码。
=====================================
         BOOL the_bRet = FALSE;
BYTE* the_pBuff = NULL;;
DWORD the_FileSize;
DWORD the_ReadSize;
for(;;)
{
the_FileSize = ::GetFileSize( the_hFile, NULL );
if( -1 == the_FileSize )
break; try{
the_pBuff = new BYTE[the_FileSize+1];
::ZeroMemory( the_pBuff, the_FileSize+1 ); }catch(...){ break;
}
if( FALSE == ::ReadFile( the_hFile, the_pBuff, the_FileSize, &the_ReadSize, NULL ) )
break; short the_Sig;
WCHAR* the_ReadPoint = (WCHAR*)the_pBuff;
::memcpy( &the_Sig, the_pBuff, sizeof(short) );
if( (short)0xFFFE == the_Sig || (short)0xFEFF == the_Sig )
the_ReadPoint++; USES_CONVERSION;
Eula = W2A(the_ReadPoint);
the_bRet = TRUE;
break; } ::CloseHandle( the_hFile );
========================
每次读完后,Eula是返回值,都有一个小尾巴。显示一串???????
谁能告诉我为什么。