BeginUpdateResource

  HANDLE BeginUpdateResource(lpszExeFile)    
  LPTSTR lpszExeFile; /* file in which to update resources */

The BeginUpdateResource function returns a handle that can be used with the UpdateResource function to add, delete, or replace resources in an executable file.

Parameters

lpszExeFile

Points to a null-terminated string that specifies a Windows executable file in which to update resources. The application must be able to obtain write access to this file; it cannot be currently executing. If lpszExeFile does not specify a full path, Win32 searches for the file in the current directory.

Return Value

If the function is successful, the return value is a handle that can be used with the UpdateResource and EndUpdateResource functions. Otherwise, the return value is NULL. This occurs if lpszExeFile is not an executable file, the executable file is already loaded, the file does not exist, or the file could not be opened for writing. Use the GetLastError function to obtain extended error information.

Comments

The EndUpdateResource function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

EndUpdateResource, UpdateResource