Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How often is SYS(2015) changed?
Message
 
To
07/09/2011 16:21:36
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01521892
Message ID:
01522944
Views:
63
LOL. Yup DWORD is 32 bits...

Actual value range though tends to be under 1 million (that I've ever seen). I've seen low 100,000 values but those are very rare.

+++ Rick ---

>>four hex digits isn't enough to hold thread ID values. ThreadId is a DWORD (8 bits) and so your hex width needs to cover 8 characters. At the very least you'd need 5 hex digits since threadIDs definitely can exceed 65535...
>>
>>+++ Rick ---
>
>Actually - I think a DWORD is more than 8 bits ;)
>
>
>
>>
>>>That is a very excellent idea...
>>>But I prefer to use hexadecimal value that will always result 4 bytes length.
>>>
>>>
>>>m.lcNewID = SYS(2015) + RIGHT(TRANSFROM(Application.ThreadId, "@0"), 4)
>>>
>>>
>>>What do you think, sir?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Reply
Map
View

Click here to load this message in the networking platform