private static extern bool UpdateResource( UpdateResourceHandle hUpdate, nint lpType, string lpName, ushort wLanguage, byte[] lpData, int cb);
public ResourceUpdater(FileInfo peFile) { handle = BeginUpdateResource(peFile.FullName, false); if (handle.IsInvalid) { throw new Win32Exception(Marshal.GetLastPInvokeError(), peFile.FullName); } }
public static extern bool EndUpdateResource([In] UpdateResourceHandle hUpdate, [MarshalAs(UnmanagedType.Bool)] bool fDiscard);
public static extern bool UpdateResource([In] UpdateResourceHandle hUpdate, string lpType, string lpName, ushort wLanguage, [In] IntPtr lpData, uint cbData);