标签:make oba bsp err pen lob free resource show
BOOL FreeMyResource(UINT uResouceName,char *szResourceType,char *szFileName) { HRSRC hRsrc = ::FindResource(NULL,MAKEINRESOURCE(uResouceName),szResourceType); if(NULL == hRsrc) { ShowError("FindResource"); return FALSE; } DWORD dwSize = ::SizeofResource(NULL,hRsrc); if(0 >= dwSize) { ShowError("SizeofResource"); return FALSE; } HGLOBAL hGlobal = ::LoadResource(NULL,hRsrc); if(NULL == hGlobal) { ShowError("LoadResource"); return FALSE; } LPVOID lpVoid = ::LockResource(hGlobal); if(NULL == lpVoid) { ShowError("LockResource"); return FALSE; } FILE *fp = NULL; fopen_s(&fp,szFileName,"wb+"); if (NULL == fp) { ShowError("OpenFileFailed"); return FALSE; } fwrite(lpVoid,sizeof(char),dwSize,fp); fclose(fp); return TRUE; }
标签:make oba bsp err pen lob free resource show
原文地址:https://www.cnblogs.com/icyvalley/p/13212208.html