This is the Win32 API method,I'm going to use “BeginUpdateResource”, “UpdateResource”, “EndUpdateResource” method to modify DLL file version。
It is defined as follows:
[DllImport("Kernel32.dll", EntryPoint = "FindResourceW", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern IntPtr FindResource(IntPtr hModule, string pName, string pType);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr BeginUpdateResource(string pFileName, [MarshalAs(UnmanagedType.Bool)]bool bDeleteExistingResources);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool UpdateResource(IntPtr hUpdate, string lpType, string lpName, ushort wLanguage, IntPtr lpData, uint cbData);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard);
However, I do not know how to set parameters
“lpType”, “lpName” values
I want to achieve the effect of the picture
<img src="http://www.uzzf.com/up/2012-10/201210231672875970.jpg" width="456" height="328" />