Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   C -> Delphi: Problem mit Umwandlung (https://www.delphipraxis.net/50503-c-delphi-problem-mit-umwandlung.html)

jackie 26. Jul 2005 21:10


C -> Delphi: Problem mit Umwandlung
 
Hi!
Ich hätte da ein kleineres Problem beim übersetzen einer C-Datei. Bei folgenden Zeilen stehe ich an:
Code:
#define REFRESH_QUERY_CACHE_FREE 0x20000L
#define REFRESH_DES_KEY_FILE   0x40000L
#define REFRESH_USER_RESOURCES   0x80000L
#define CLIENT_REMEMBER_OPTIONS   (((ulong) 1) << 31)
#define packet_error (~(unsigned long) 0)
#define SHUTDOWN_KILLABLE_CONNECT   (unsigned char)(1 << 0)
#define SHUTDOWN_KILLABLE_TRANS     (unsigned char)(1 << 1)
#define SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
#define SHUTDOWN_KILLABLE_UPDATE    (unsigned char)(1 << 3)
#define NULL_LENGTH ((unsigned long) ~0)
Kann mir jemand helfen?

scp 26. Jul 2005 21:40

Re: C -> Delphi: Problem mit Umwandlung
 
Siehe hier, Beispiele:

Delphi-Quellcode:
const REFRESH_QUERY_CACHE_FREE = $20000
const SHUTDOWN_KILLABLE_LOCK_TABLE = (1 shl 2);

Olli 27. Jul 2005 11:36

Re: C -> Delphi: Problem mit Umwandlung
 
~ steht übrigens für Negation. Also alle Bits werden umgekehrt. Aus 0 wird $FFFFFFFF (jedenfalls bei 32bit).


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:53 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz