very nice piece of code.. i've played around with it (2209 MHz here..:D)
by dividing through some value, we can make it run much faster (1sec is so slow... at least, to just wait and do nothing..)
..ulValue.QuadPart = ulTicks.QuadPart + ulFreq.QuadPart/16;..
..return (DWORD)((ulEAX_EDX.QuadPart - ulStartCounter.QuadPart)*16/1000000);..
for example.. i tested it by dividing trough 256, and still got 2209 MHz.. and you could call it 256 times per second.. quite fine, not?..
just a suggestion..
you should store the value in the end anyways, and use it directly.. if you need to.