Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
What is DWORD?

 
Post new topic   Reply to topic Printable version
 View previous topic  Open source client-server security Post :: Post A Cicular Queue Utility Written in C  View next topic  
Author Message
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Tue Aug 12, 2008 11:06 am    Post subject: What is DWORD? Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Bak
?ls -s
0 in


Age:19
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Aug 12, 2008 11:13 am    Post subject: Reply to topic Reply with quote

http://en.wikipedia.org/wiki/Word_(computer_science)#Dword_and_Qword
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Samapico
No, these DO NOT look like penises, ok?


Age:31
Gender:Gender:Male
Joined: May 08 2003
Posts: 1252
Location: Montreal, Canada
Offline

PostPosted: Tue Aug 12, 2008 6:42 pm    Post subject: Reply to topic Reply with quote

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.)

_________________
DCME co-developer
17th Parallel Head Sysop
Subspace: The Future


Last edited by Samapico on Tue Aug 12, 2008 10:20 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:19
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Tue Aug 12, 2008 6:56 pm    Post subject: Reply to topic Reply with quote

Quote:
So a word being 16 bits, or 2 bytes (as shown in Bak's link), a Dword would be 8 bytes
icon_sad.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Tue Aug 12, 2008 8:53 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Age:31
Gender:Gender:Male
Joined: May 08 2003
Posts: 1252
Location: Montreal, Canada
Offline

PostPosted: Tue Aug 12, 2008 10:21 pm    Post subject: Reply to topic Reply with quote

4



4 it is


2 x 2 = 4

I wrote a word was 4 bytes first, then noticed it was 2... so ... yeah... tongue.gif
Back to top
View users profile Send private message Add User to Ignore List
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Tue Aug 12, 2008 11:11 pm    Post subject: Reply to topic Reply with quote

oh OK so DWORD pretty much is used for memory addresses

what about how to download a file from the web?
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Age:31
Gender:Gender:Male
Joined: May 08 2003
Posts: 1252
Location: Montreal, Canada
Offline

PostPosted: Tue Aug 12, 2008 11:34 pm    Post subject: Reply to topic Reply with quote

well, for one it has nothing to do with dwords,

and... well there are probably 314315 different ways to do it.

http://www.google.ca/search?hl=fr&q=c%2B%2B+download+file&meta=

first result gives what looks like a project that does what you want.
Back to top
View users profile Send private message Add User to Ignore List
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Wed Aug 13, 2008 12:44 am    Post subject: Reply to topic Reply with quote

ah I searched "how to make c++ download files from the web" and couldn't find anything good, thanks
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Wed Aug 13, 2008 1:44 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Wed Aug 13, 2008 8:37 am    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
hellzlaker
Registered Cap Buster
Popping men in the ass since Oct 2005


Gender: NEVER ENOUGH!
Joined: Oct 27 2005
Posts: 34
Offline

PostPosted: Wed Aug 13, 2008 9:37 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List Send email AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 86 page(s) served in previous 5 minutes.

phpBB Created this page in 0.106962 seconds : 37 queries executed (41.4%): GZIP compression disabled