Request for version.dll

l8p2l8p2 Posts: 2
edited March 14, 2013 6:03AM in PInvoke.Net
Adding the following:
[DllImport("Version.dll", SetLastError = true)]
public static extern bool GetFileVersionInfo(
/*_in_*/ string sFilename,
/*_reserved_*/ int handle,
/*_in_ */ int size,
/*_out_ */ byte[] infoBuffer);

[DllImport("Version.dll", SetLastError = true)]
public static extern int GetFileVersionInfoSize(
/*_in_*/ string sFilename,
/*_out_opt_*/ out int handle);

// The third parameter - "out byte* pValue"
// Ansi encoding
[DllImport("Version.dll", SetLastError = true)]
unsafe public static extern bool VerQueryValue(
/*_in_*/ byte[] pBlock,
/*_in_*/ string pSubBlock,
/*_out_*/ out byte* pValue,
/*_out_*/ out uint len);

// This VerQueryValue overload is marked with 'unsafe' because
// it uses a short*:
[DllImport("Version.dll")]
unsafe public static extern bool VerQueryValue(
/*_in_*/ byte[] pBlock,
/*_in_*/ string pSubBlock,
/*_out_*/ out short* pValue,
/*_out_*/ out uint len);

Comments

Sign In or Register to comment.