Esempio n. 1
0
 /// <summary>
 /// Create a resource updater for the given PE file. This will
 /// acquire a native resource update handle for the file,
 /// preparing it for updates. Resources can be added to this
 /// updater, which will queue them for update. The target PE
 /// file will not be modified until Update() is called, after
 /// which the ResourceUpdater can not be used for further
 /// updates.
 /// </summary>
 public ResourceUpdater(string peFile)
 {
     hUpdate = Kernel32.BeginUpdateResource(peFile, false);
     if (hUpdate.IsInvalid)
     {
         ThrowExceptionForLastWin32Error();
     }
 }
Esempio n. 2
0
 public static extern bool EndUpdateResource(SafeUpdateHandle hUpdate,
                                             bool fDiscard);
Esempio n. 3
0
 public static extern bool UpdateResource(SafeUpdateHandle hUpdate,
                                          IntPtr lpType,
                                          IntPtr lpName,
                                          ushort wLanguage,
                                          [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5)] byte[] lpData,
                                          uint cbData);
Esempio n. 4
0
 public static extern bool UpdateResource(SafeUpdateHandle hUpdate,
                                          IntPtr lpType,
                                          IntPtr lpName,
                                          ushort wLanguage,
                                          IntPtr lpData,
                                          uint cbData);