摘要:
1.为什么要用GlobalLock()函数C/C++ code HGLOBAL hImageMemory=GlobalAlloc(GMEM_MOVEABLE, dwFileSize); //给图片分配全局内存 void *pImageMemory=GlobalLock(hImageMemory); //锁定内存 DWORD dwReadedSize; //保存实际读取的文件大小 ReadFile(hFile, pImageMemory, dwFileSize, &dwReadedSize, NULL); //读取图片到全局内存当中 GlobalUnlock(hImageMemory); 阅读全文