Re: convert typedef struct from C++ to VB

Tech-Archive recommends: Fix windows errors by optimizing your registry



Ralph <nt_consulting64@xxxxxxxxx> schrieb im Beitrag
<eRSB1cVOJHA.1908@xxxxxxxxxxxxxxxxxxxx>...
You can expand the definition as far as you want, but for every C/C++
compiler that does Windows - you'll find something like this in the
background.
typedef unsigned long DWORD;
typedef unsigned char BYTE;
typedef unsigned short WORD;

Yeah, and this shows what's going on: The rightmost part gives the name of
the new type and tells the compiler to treat 'DWORD', etc. like 'unsigned
long' etc. The compiler has to be told so since it doesn't by default;
'DWORD', 'BYTE', and 'WORD' are not (native) data types by default.

--
----------------------------------------------------------------------
Thorsten Albers albers(a)uni-freiburg.de
----------------------------------------------------------------------

.



Relevant Pages

  • Re: Fixing the Compiler Warning Message C4146:
    ... It is fairly safe to assume that such examples from textbooks are always erroneous. ... DWORD w = -n; ... and the compiler rightly complains that the code makes no sense. ... and this worked fine until Win64 came around, and the API is now specified as ...
    (microsoft.public.vc.mfc)
  • Re: CreateRemoteThread
    ... I'm just trying to have the thread sleep for a ... static DWORD WINAPI Test() ... WriteProcessMemory(hProcess, pCodeRemote, &Test, 1024, NULL); ... compiler has linked your program together. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Unexpected behavior in VC
    ... via memory mapped access. ... be dword accesses. ... xxxxxx00 B8000000F0 mov eax,0F0000000h ... the compiler generates the 'correct' code. ...
    (microsoft.public.vc.language)
  • Re: Problem with char type in structures (MSVC)
    ... > typedef unsigned long DWORD; ... > 2) What add in source code or change in project settings to fix it ... The compiler may insert padding in structs to align the members properly. ...
    (comp.lang.cpp)
  • Re: template statt makro
    ... >>So funktioniert das aber nicht, weil mein Compiler mir erzählt, dass er ... > die Funktio für einen Typ aufrufen willst. ... > die Templateargumente nicht angibst, ... DWORD MyClass::readDWORD const ...
    (microsoft.public.de.vc)