另附一段E文,感兴趣的读读!<br><br>Exist any api to make changes in some strings variable direct in > a exe file?? <br>like: On NT (but not Windows9X) you can modify resources (see excerpt from MSDN below). <br>For the sake of completeness I describe the alternative: Directly modifing a running executable file is not <br>possible. You would have to copy it to temporary file and modify that. One way to rename the <br>temporary back again is + start the temporary .exe (e.g. ShellExecute) + terminate the original .exe + the <br>temporary .exe checks its name with GetModuleFileName(0, ...) + if it's not the expected name it <br>deletes the old .exe + copies itself + starts the copy From the MSDN: The UpdateResource function <br>adds, deletes, or replaces a resource in an executable file. BOOL UpdateResource( HANDLE <br>hUpdate, // update-file handle LPCTSTR lpType, // address of resource type to update LPCTSTR <br>lpName, // address of resource name to update WORD wLanguage, // language identifier of resource <br>LPVOID lpData, // address of resource data DWORD cbData // length of resource data, in bytes ); <br>Remarks An application can use UpdateResource repeatedly to make changes to the resource data. <br>Each call to UpdateResource contributes to an internal list of additions, deletions, and replacements but <br>does not actually write the data to the executable file. The application must use the EndUpdateResource <br>function to write the accumulated changes to the executable file. QuickInfo Windows NT: Requires <br>version 3.1 or later. Windows: Unsupported. Windows CE: Unsupported. Header: Declared in <br>winbase.h. Import Library: Use kernel32.lib. Unicode: Implemented as Unicode and ANSI versions on <br>Windows NT. <br>