是这样的  我有一个程序 要加载DLL里面的资源 读取没什么问题 就是修改 卡主了  该如何修改呢?
int main(int argc, char* argv[])
{ HANDLE hUpdate = BeginUpdateResource("C:\\NOTEPAD.EXE",FALSE);

if(hUpdate == NULL)
return 1; CHAR *pData="111111111111111111111111111111111"; UpdateResource(hUpdate,"INI",MAKEINTRESOURCE(103),NULL,
NULL,NULL); EndUpdateResource(hUpdate,FALSE); return 0;
}
上面代码是错的...谁有这方面的资料告诉下..或者给个代码也行就是把INI 下面的103 资源的 AAAAAAAAAAAAAAAAAA
改成 111111111111111111111我结贴很效率的...坐等好人..

解决方案 »

  1.   


    HANDLE hUpdate = ::BeginUpdateResource(pszTargetFile, FALSE);
    if(hUpdate) // update resource data
    {
    bRet = UpdateResource(hUpdate, RT_ICON, MAKEINTRESOURCE(IconCursorId), 0, second, BytesInRes);
    bRet &&== ::EndUpdateResource(hUpdate, FALSE);
    }
    网上很多教程的
      

  2.   

    Updating Resources
    The following example copies a dialog box resource from one executable file, Hand.exe, to another, Foot.exe, by following these steps: 1. Use the LoadLibrary function to load the executable file Hand.exe. 
    2. Use the FindResource and LoadResource functions to locate and load the dialog box resource. 
    3. Use the LockResource function to retrieve a pointer to the dialog box resource data. 
    4. Use the BeginUpdateResource function to open an update handle to Foot.exe. 
    5. Use the UpdateResource function to copy the dialog box resource from Hand.exe to Foot.exe. 
    6. Use the EndUpdateResource function to complete the update. 
    The following code implements these steps.
      

  3.   

    1楼啊 看清楚啊.你那是图标资源 那个INI 都是我自己定义的资源