Created
September 26, 2014 14:01
-
-
Save hounsell/87aadc440a7fc3faadc2 to your computer and use it in GitHub Desktop.
Get Language Id for File (Part 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Runtime.Versioning; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace VersionInfo | |
{ | |
internal static class NativeMethods | |
{ | |
[DllImport("version.dll", CharSet = CharSet.Auto, SetLastError = true, BestFitMapping = false)] | |
public static extern int GetFileVersionInfoSize(string lptstrFilename, out int handle); | |
[DllImport("version.dll", CharSet = CharSet.Auto, BestFitMapping = false)] | |
public static extern bool GetFileVersionInfo(string lptstrFilename, int dwHandle, int dwLen, HandleRef lpData); | |
[DllImport("version.dll", CharSet = CharSet.Auto, BestFitMapping = false)] | |
public static extern bool VerQueryValue(HandleRef pBlock, string lpSubBlock, [In, Out] ref IntPtr lplpBuffer, out int len); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment