首页 > 其他分享 >loaddll

loaddll

时间:2023-06-06 20:35:26浏览次数:50  
标签:AfxGetInstanceHandle hfFile hrFile hgFile AfxMessageBox loaddll NULL

//HRSRC hrFile = FindResource(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDRETRY), L"sys"); //后面这连个参数很重要
//if (hrFile == NULL)
//{
// AfxMessageBox(L"没有找到资源 ");
//}
//HGLOBAL hgFile = LoadResource(AfxGetInstanceHandle(), hrFile);
//if (hgFile == NULL)
//{
// AfxMessageBox(L"加载资源失败 ");
//}
//LPVOID pvFile = LockResource(hgFile);
//if (pvFile == NULL)
//{
// AfxMessageBox(L"不能加载内存 ");
//}
//HANDLE hfFile = CreateFile(L".\\ArkDriver.sys", GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
//DWORD nFileLength = SizeofResource(AfxGetInstanceHandle(), hrFile);
//DWORD nWriteLength;
//WriteFile(hfFile, pvFile, nFileLength, &nWriteLength, NULL);
//CloseHandle(hfFile);
//FreeResource(hrFile);

标签:AfxGetInstanceHandle,hfFile,hrFile,hgFile,AfxMessageBox,loaddll,NULL
From: https://www.cnblogs.com/yewu1/p/17461626.html

相关文章