Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:51:47+00:00 2026-05-26T22:51:47+00:00

in WinAPI: typedef unsigned long DWORD; I think DWORD, WORD … is the basic

  • 0

in WinAPI:

typedef unsigned long DWORD;

I think DWORD, WORD … is the basic data type in computer, for no matter int, unsigned long… it will be converted to DWORD finally in assembly, why should it be converted to unsigned long here? Can’t I use DWORD directly without the difinition?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:51:47+00:00Added an answer on May 26, 2026 at 10:51 pm

    DWORD is whatever it is defined to be (there is no automatic translation to a specific width in assembly). This typedef is needed because the WinAPI interfaces are all defined with unsigned longs wherever DWORD is used. IOW, you need this definition in place to work with the API.

    To answer your other question. This answer is no, DWORD can’t be used without a definition. It isn’t a built-in type for the compiler.

    The definition of DWORD is fixed for the Win32 API: http://msdn.microsoft.com/en-us/library/aa383751(VS.85).aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

typedef struct{ IMAGE *fuente; IMAGE *destino; int saltos; } ARGTHREAD; ARGTHREAD values; DWORD WINAPI
This typedef: typedef DWORD WINAPI (* CM_Open_DevNode_Key)(DWORD, DWORD, DWORD, DWORD, PHKEY, DWORD); compiles fine
Basically I have a header file like this: #if WIN32 typedef DWORD (WSAAPI *SocketStartup)
I have a native api function which looks like: DWORD WINAPI WlanRegisterNotification( __in HANDLE
Windows SDK contains a set of typedefs: typedef long LONG; typedef struct tagPOINT {
I have a thread like this: DWORD WINAPI message_loop_thread(LPVOID dummy) { MSG message; while
I'm passing a simple user-defined type (UDT) from Visual Basic 6 to a C
With C++ and some Winapi things, I encountered this guy: #if defined(MIDL_PASS) typedef struct
For example: int WINAPI WinMain ( HINSTANCE instance, HINSTANCE prev_instance, PSTR cmd_line, int cmd_show
WinAPI OpenFile function returns HFILE, and GetFileTime for instance needs HANDLE. When I feed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.