Hello can somebody explain me how many 0x90 can i add into BYTE / WORD / DWORD
-
Im on c++ and if i define a BYTE, WORD, DWORD or is there something larger that can hold more bites? const BYTE NopTwoBytes[2] = {0x90, 0x90}; Now how much could hold word and dword and is there something more larger?
Your question doesn't make much sense :) The sizes of the Windows data types you mention are: BYTE 1 byte WORD 2 bytes DWORD 4 bytes DWORD64 8 bytes The value 0x90 fits in one byte.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Your question doesn't make much sense :) The sizes of the Windows data types you mention are: BYTE 1 byte WORD 2 bytes DWORD 4 bytes DWORD64 8 bytes The value 0x90 fits in one byte.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
Im on c++ and if i define a BYTE, WORD, DWORD or is there something larger that can hold more bites? const BYTE NopTwoBytes[2] = {0x90, 0x90}; Now how much could hold word and dword and is there something more larger?
Probably the most complex but easy to use C++ construct is "sizeof". This little wonder will tell you the size of almost anything except Bill Gate's wallet. For example:
printf("The size of a BYTE = %d\n", sizeof(BYTE)); struct MyStruct{ int x; float y; char wibble[256]; ... }; size_t MystructSize = sizeof(MyStruct);
Well you get the idea. Quite an amazing little fellow is "sizeof" Regards T