提取资源,然后修改,VC/VB,BC/DElphi/PB 格式不同,当然也不一定能够翻译完整.汉化工具漫天飞,Updating Resources <br> The following example copies a dialog box resource from one executable file, Hand.exe, to another, Foot.exe, by following these steps: <br> <br> Use the LoadLibrary function to load the executable file Hand.exe. <br> Use the FindResource and LoadResource functions to locate and load the dialog box resource. <br> Use the LockResource function to retrieve a pointer to the dialog box resource data. <br> Use the BeginUpdateResource function to open an update handle to Foot.exe. <br> Use the UpdateResource function to copy the dialog box resource from Hand.exe to Foot.exe. <br> Use the EndUpdateResource function to complete the update. <br> The following code implements these steps. <br> <br> HRSRC hResLoad; // handle to loaded resource <br> HANDLE hExe; // handle to existing .EXE file <br> HRSRC hRes; // handle/ptr. to res. info. in hExe <br> HANDLE hUpdateRes; // update resource handle <br> char *lpResLock; // pointer to resource data <br> BOOL result; <br> // Load the .EXE file that contains the dialog box you want to copy. <br> hExe = LoadLibrary("hand.exe"); <br> if (hExe == NULL) <br> { <br> ErrorHandler("Could not load exe."); <br> } <br> <br> // Locate the dialog box resource in the .EXE file. <br> hRes = FindResource(hExe, "AboutBox", RT_DIALOG); <br> if (hRes == NULL) <br> { <br> ErrorHandler("Could not locate dialog box."); <br> } <br> <br> // Load the dialog box into global memory. <br> hResLoad = LoadResource(hExe, hRes); <br> if (hResLoad == NULL) <br> { <br> ErrorHandler("Could not load dialog box."); <br> } <br> <br> // Lock the dialog box into global memory. <br> lpResLock = LockResource(hResLoad); <br> if (lpResLock == NULL) <br> { <br> ErrorHandler("Could not lock dialog box."); <br> } <br> <br> // Open the file to which you want to add the dialog box resource. <br> hUpdateRes = BeginUpdateResource("foot.exe", FALSE); <br> if (hUpdateRes == NULL) <br> { <br> ErrorHandler("Could not open file for writing."); <br> } <br> <br> // Add the dialog box resource to the update list. <br> result = UpdateResource(hUpdateRes, // update resource handle <br> RT_DIALOG, // change dialog box resource <br> "AboutBox", // dialog box name <br> MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), // neutral language <br> lpResLock, // ptr to resource info <br> SizeofResource(hExe, hRes)); // size of resource info. <br> if (result == FALSE) <br> { <br> ErrorHandler("Could not add resource."); <br> } <br> <br> // Write changes to FOOT.EXE and then close it. <br> if (!EndUpdateResource(hUpdateRes, FALSE)) <br> { <br> ErrorHandler("Could not write changes to file."); <br> } <br> <br> // Clean up. <br> if (!FreeLibrary(hExe)) <br> { <br> ErrorHandler("Could not free executable."); <br> }