Geeks With Blogs
Marcin Celej blog September 2006 Entries
Generating Unique Id (Int64) in your application
I needed to generate some unique number in my application. I could use GUID, but it was too large for me (I need to keep lots of unique identifiers). I found something like this:[System.Runtime.Intero... private static extern int QueryPerformanceFrequency(ref System.Int64 frequency); [System.Runtime.InteropServ... private static extern int QueryPerformanceCounter(ref System.Int64 performanceCount); public static long GenerateUniqueId() ......

Posted On Friday, September 29, 2006 5:43 PM

Attaching to a process from VS using macro
I found interesting macro. It allows you to attach to a process from VS. I use it very often to attach to NUnit gui. I have a toolbar button in my VS that invokes the macro. I found it quite useful.'This subroutine attaches to the first nunit-gui.exe process found. Sub AttachToNUnit() Dim process As EnvDTE.Process For Each process In DTE.Debugger.LocalProcesses If (process.Name.ToLower().End... Then process.Attach() Exit Sub End If Next MsgBox("No nunit-gui.exe found") End Sub ......

Posted On Monday, September 18, 2006 8:04 AM

Copyright © Marcin Celej | Powered by: