|
-
January 16th, 2006, 03:55 PM
#40
Re: Hex Viewer / Editor
 Originally Posted by WizBang
Well, I haven't looked over your code enough to see when/if that can happen, but there is an easy fix for that too
To limit a value to 8 bits, just use:
Val("&H" & HexString) And 255
I just found that Clng ("&HFFFF") gives 65535 and not -1 .. 
Modifing the looooooonnnnnngggg Hex to val codes to use this now ...
Gremmy...
------- EDIT -----
The hacks at M$... CCur does the same as Clng...
Code:
Quote = VB Books Online....
Conver. Converts an expression to
function
CByte Byte
CCur Currency
CDate Date
CDbl Double
CInt Integer
CLng Long
CSng Single
CStr String
CVar Variant
And ...
Currency (scaled integer) 8 bytes -922,337,203,685,477.5808 to 922,337,203,685,477.5807
But a Simple CCur ("&H1FFFFFFFF") Returns a OverFlow error ...
I wont be surprised if CCur is the Clng code ....
Last edited by GremlinSA; January 16th, 2006 at 04:14 PM.
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|