2012年(158)
分类: C/C++
2012-11-23 15:27:25
网友评论2012-11-23 15:32:23
周星星
HANDLE hfile = ::CreateFile( _T("F:\\1.jpg"), GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_ARCHIVE, 0 );
if( INVALID_HANDLE_VALUE != hfile )
{
LARGE_INTEGER fsize;
if( GetFileSizeEx(hfile,(PLARGE_INTEGER)&fsize) && fsize.HighPart==0 )
{
HGLOBAL hGlobal = ::GlobalAlloc(GMEM_MOVEABLE,fsize.LowPart);