c++ 加载资源文件
int _tmain(int argc, _TCHAR* argv[]) { HRSRC hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDR_DATA1), L"DATA"); DWORD dwSize = SizeofResource(NULL, hRsrc); HGLOBAL hGlobal = LoadResource(NULL, hRsrc); LPVOID pBuffer = LockResource(hGlobal); BYTE* pByte = new BYTE[dwSize + 1]; memcpy(pByte, pBuffer, dwSize); GlobalUnlock(hGlobal); }
桂棹兮兰桨,击空明兮溯流光。