Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Vb - Hex2dec

Featured Replies

Posted

Hi.

I have problem with converting Hex to Dec in VB.

I have hex string for example "975D46ED" - in HexDecChar by Ap0x it is "-1755494675" (bad) but in CrackersTool it is "2539472621"(good). Hmm strange...

My code is :

SerialHex = CStr(Blabla1hex) & CStr(Blabla2hex) & CStr(Blabla3hex) Hex2Dec = CLng("&H" + SerialHex)Text2.Text = Hex2Dec

And my app give me...bad "-1755494675" not good "2539472621".

Can anyone help ?

Hi.

I have problem with converting Hex to Dec in VB.

I have hex string for example "975D46ED" - in HexDecChar by Ap0x it is "-1755494675" (bad) but in CrackersTool it is "2539472621"(good). Hmm strange...

My code is :

SerialHex = CStr(Blabla1hex) & CStr(Blabla2hex) & CStr(Blabla3hex) Hex2Dec = CLng("&H" + SerialHex)Text2.Text = Hex2Dec

And my app give me...bad "-1755494675" not good "2539472621".

Can anyone help ?

I have no idea about vb coding ,but you are getting the result as signed #, just get the output as unsigned # , you will have the desired result. Regards.

Dater,

Try the following:

Function LongToUnsigned(Value As Long) As Double
If Value < 0 Then
LongToUnsigned = Value + 4294967296#
Else
LongToUnsigned = Value
End If
End Function'Use the function like this in your code
Text2.Text = LongToUnsigned(Hex2Dec)

Code Source: http://support.microsoft.com/kb/q189323/

Happy Coding,

Napalm

Edited by Napalm

Thanks guys.

Napalm this is my working code:

EndString = CStr(Looop4bHex) & CStr(Looop4cHex) & CStr(Looop4dHex) & CStr(EndAlgoHex)Hex2Dec = CLng("&H" + EndString)Text2.Text = LongToUnsigned(Hex2Dec)End SubFunction LongToUnsigned(Value As Long) As Double
If Value < 0 Then
LongToUnsigned = Value + 4294967296#
Else
LongToUnsigned = Value
End If
End Function

This converts "975D46ED" to "2539472621" and from other 5lenght names too...But not for all for example for "david" returns me "Runtime error '6': Overflow" ;)

So my next question is - it is depend to "4294967296#" from code ?

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.