Author |
Message |
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Tue Aug 12, 2008 11:06 am Post subject: What is DWORD? |
|
|
|
|
I know it stands for double word in 32 bit, but i don't get how come DWORD can be like 0x00045 or bunch of other digits, and not 2 words like it means, for me a double word is something like "funny cat" |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Tue Aug 12, 2008 6:42 pm Post subject: |
|
|
|
|
Numbers represented by 0x#######...
are hexadecimal numbers
2 hexadecimal characters are equivalent to one byte. Hex characters are 0 to 9 and A to F (16 different possible characters). Combine 2 hex characters you get 16*16 different possibilities, representing values from 0 to 255, just like a byte.
So a word being 16 bits, or 2 bytes (as shown in Bak's link), a Dword would be 4 bytes, so something like 0x00112233 would be a DWORD I guess
Correct me if I'm wrong, people
Fun fact:
http://en.wikipedia.org/wiki/Intel_80486 wrote: | (The i486 was so named, without the usual 80-prefix, because of a court ruling that prohibited trademarking numbers like 80486. Later, with the Pentium, Intel dropped number-based naming altogether.) |
_________________ (Insert a bunch of dead links here)
Last edited by Samapico on Tue Aug 12, 2008 10:20 pm, edited 1 time in total |
|
Back to top |
|
|
Bak ?ls -s 0 in
Age:25 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Tue Aug 12, 2008 6:56 pm Post subject: |
|
|
|
|
Quote: | So a word being 16 bits, or 2 bytes (as shown in Bak's link), a Dword would be 8 bytes | |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Tue Aug 12, 2008 8:53 pm Post subject: |
|
|
|
|
uhm Bak was Samapico wrong? why so said?
Also how do you download a file from the web in c++? I searched on google and all I found out was that its easy in win32 but didn't find how to do it |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
Posted: Tue Aug 12, 2008 10:21 pm Post subject: |
|
|
|
|
4
4 it is
2 x 2 = 4
I wrote a word was 4 bytes first, then noticed it was 2... so ... yeah... |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Tue Aug 12, 2008 11:11 pm Post subject: |
|
|
|
|
oh OK so DWORD pretty much is used for memory addresses
what about how to download a file from the web? |
|
Back to top |
|
|
Samapico No, these DO NOT look like penises, ok?
Joined: May 08 2003 Posts: 1252 Offline
|
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Wed Aug 13, 2008 12:44 am Post subject: |
|
|
|
|
ah I searched "how to make c++ download files from the web" and couldn't find anything good, thanks |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Wed Aug 13, 2008 1:44 am Post subject: |
|
|
|
|
wierd problem my code
HRESULT download = URLDownloadToFile(0,"http://wua.la/hellzlaker/Documents/afa.txt","A3_GANJA_Config.ini",0,0);
visual c++ gives me this
'URLDownloadToFileW' : cannot convert parameter 2 from 'const char [54]' to 'LPCWSTR |
|
Back to top |
|
|
k0zy Server Help Squatter
Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Wed Aug 13, 2008 8:37 am Post subject: |
|
|
|
|
It's not wierd...
How about you try casting it into a LPCWSTR?
Oh wait... that's a wide string.
Try the _T macro.
URLDownloadToFile(0, _T("http://wua.la/hellzlaker/Documents/afa.txt"),"A3_GANJA_Config.ini",0,0); _________________ It's a shark! Oh my god! Unbelievable! |
|
Back to top |
|
|
hellzlaker Registered Cap Buster Popping men in the ass since Oct 2005
Gender: NEVER ENOUGH! Joined: Oct 27 2005 Posts: 34 Offline
|
Posted: Wed Aug 13, 2008 9:37 pm Post subject: |
|
|
|
|
I fixed it the _T macro didn't work, neither did L and TEXT() but I fixed it, when to options and changed character settings from unicode to multi byte |
|
Back to top |
|
|
|