What is the difference between DWORD and HANDLE types in C?

I have a stream with a return type DWORDin C, but then it is processed by a type pointer HANDLE.

What is the difference between these two types?

I am asking this question specifically for ANSI C.

It is true that DWORD- type uint, and HANDLE- PVOID, and C allows you to directly pass DWORDto HANDLE. But is there a difference in these types, or can I just say that they are the same?

This is a question that was asked during the discussion. I want to know what the correct answer is.

+3
source share
2 answers

Win32:

  • 32 bit unsigned DWORD
  • HANDLE void * (32-bit pointer)

Win64

  • 32 bit unsigned DWORD
  • HANDLE void * (64-bit pointer)

, . Win32 , Win64.

+4

A HANDLE - PVOID void * typedef, DWORD - uint32. void * (, x86 x64)?

0

Source: https://habr.com/ru/post/1736632/


All Articles