Computer Hardware Forum - TweakPC

Computer Hardware Forum - TweakPC (https://www.tweakpc.de/forum/)
-   Programmiersprachen (https://www.tweakpc.de/forum/programmiersprachen/)
-   -   Vier Bytes in ein Long (=DWord) packen? (https://www.tweakpc.de/forum/programmiersprachen/26795-vier-bytes-in-long-dword-packen.html)

Qndre 25.07.2005 15:29

Vier Bytes in ein Long (=DWord) packen?
 
Wie kann man in Visual-Basic (nicht .NET!) vier Bytes in ein vorzeichenbehaftetes DWord (auch "Long" genannt) packen und umgekehrt? Das ganze gestaltet sich recht schwierig, da es keine 32-bit Unsigned ist sondern eine 32-bit Signed. Daher funktioniert nicht:

[CODE]DWord = (ByteA*1) + (ByteB*256) + (ByteC*65536) + (ByteD*16777216)[/CODE]

[B]EDIT:[/B] Habe entsprechenden Code im Netz gefunden, man muss nur lange genug suchen. Falls jemand anderes was ähnliches sucht: [url]http://vb-tec.de/bytelong.htm[/url]


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:56 Uhr.

Powered by vBulletin® Version 3.8.10 (Deutsch)
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
SEO by vBSEO 3.5.2 ©2010, Crawlability, Inc.