Please have a look on this
[
link].
Signature of
UpdateResource.
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool UpdateResource(IntPtr hUpdate, string lpType, string lpName, ushort wLanguage,
IntPtr lpData, uint cbData);
You might access this API like,
IntPtr handleExe = BeginUpdateResource(exeFilePath, false);
CultureInfo currentCulture = CultureInfo.CurrentCulture;
int pid = ((ushort)currentCulture.LCID) & 0x3ff;
int sid = ((ushort)currentCulture.LCID) >> 10;
ushort languageID = (ushort)((((ushort)pid) << 10) | ((ushort)sid));
GCHandle iconHandle = GCHandle.Alloc(resourceData, GCHandleType.Pinned);
Then you might call
UpdateResource by sending those parameters.
If you want to know the explanation of each parameter you might see this
[
link].