Click here to Skip to main content
15,913,486 members
Home / Discussions / C#
   

C#

 
GeneralRe: Trying to design thread safe class Pin
Member 120616002-Nov-15 20:19
Member 120616002-Nov-15 20:19 
GeneralRe: Trying to design thread safe class Pin
Member 1206160031-Oct-15 8:15
Member 1206160031-Oct-15 8:15 
GeneralRe: Trying to design thread safe class Pin
Member 1206160031-Oct-15 1:02
Member 1206160031-Oct-15 1:02 
Questionproblems with windows Ui Pin
Member 1209985029-Oct-15 22:25
Member 1209985029-Oct-15 22:25 
AnswerRe: problems with windows Ui Pin
F-ES Sitecore29-Oct-15 22:43
professionalF-ES Sitecore29-Oct-15 22:43 
AnswerRe: problems with windows Ui Pin
BillWoodruff29-Oct-15 22:48
professionalBillWoodruff29-Oct-15 22:48 
AnswerRe: problems with windows Ui Pin
Dave Kreskowiak30-Oct-15 3:09
mveDave Kreskowiak30-Oct-15 3:09 
QuestionFILETIME implementation in C# Pin
Member 1206160029-Oct-15 21:27
Member 1206160029-Oct-15 21:27 
AnswerRe: FILETIME implementation in C# Pin
John Torjo29-Oct-15 23:02
professionalJohn Torjo29-Oct-15 23:02 
GeneralRe: FILETIME implementation in C# Pin
Member 1206160030-Oct-15 0:10
Member 1206160030-Oct-15 0:10 
GeneralRe: FILETIME implementation in C# Pin
John Torjo30-Oct-15 0:46
professionalJohn Torjo30-Oct-15 0:46 
AnswerRe: FILETIME implementation in C# Pin
Richard MacCutchan29-Oct-15 23:06
mveRichard MacCutchan29-Oct-15 23:06 
GeneralRe: FILETIME implementation in C# Pin
Member 1206160030-Oct-15 0:09
Member 1206160030-Oct-15 0:09 
GeneralRe: FILETIME implementation in C# Pin
Richard MacCutchan30-Oct-15 1:05
mveRichard MacCutchan30-Oct-15 1:05 
QuestionVS_FIXEDFILEINFO implementation in C# Pin
Member 1206160028-Oct-15 23:51
Member 1206160028-Oct-15 23:51 
AnswerRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 0:06
mveRichard MacCutchan29-Oct-15 0:06 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 1:00
Member 1206160029-Oct-15 1:00 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 1:04
mveRichard MacCutchan29-Oct-15 1:04 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 1:08
Member 1206160029-Oct-15 1:08 
This is why I am saying it seems a bit advanced for me. This is how I have reached so far with bit of googling, maybe you can help further?

C#
[System.Runtime.InteropServices.DllImport("coredll")]
       private static extern bool GetFileVersionInfo(string filename, UInt32 handle, UInt32 len, IntPtr buffer);

       [System.Runtime.InteropServices.DllImport("coredll")]
       private static extern UInt32 GetFileVersionInfoSize(string filename, out UInt32 handle);

       [System.Runtime.InteropServices.DllImport("coredll")]
       private static extern bool VerQueryValue(IntPtr buffer, string subblock, out IntPtr blockbuffer, out int len);


           UInt32 msb = (UInt32)System.Runtime.InteropServices.Marshal.ReadInt32(verbuffer, 8); // Read the dwFileVersionMS field

           UInt32 lsb = (UInt32)System.Runtime.InteropServices.Marshal.ReadInt32(verbuffer, 12); // Read the dwFileVersionLS field

           major = (msb & 0xFFFF0000) >> 16; // Extract the top 16bits from dwFileVersionMS

           minor = (msb & 0x0000FFFF); // Extract the low 16bits from dwFileVersionMS

           build = (lsb & 0xFFFF0000) >> 16; // Extract the top 16bits from dwFileVersionLS

           revision = (lsb & 0x0000FFFF); // Extract the low 16bits from dwFileVersionLS


But I don't know what is verbuffer?
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 5:16
mveRichard MacCutchan29-Oct-15 5:16 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 5:19
Member 1206160029-Oct-15 5:19 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Richard MacCutchan29-Oct-15 5:39
mveRichard MacCutchan29-Oct-15 5:39 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 3:05
Member 1206160029-Oct-15 3:05 
AnswerRe: VS_FIXEDFILEINFO implementation in C# Pin
OriginalGriff29-Oct-15 0:11
mveOriginalGriff29-Oct-15 0:11 
GeneralRe: VS_FIXEDFILEINFO implementation in C# Pin
Member 1206160029-Oct-15 0:59
Member 1206160029-Oct-15 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.