The Win32 HANDLE type under D2

Zachary Lund admin at computerquip.com
Sun Feb 5 03:07:19 PST 2012


On 02/04/2012 01:32 PM, Stewart Gordon wrote:
> Under D1, std.c.windows.windows has HANDLE it as a typedef of void*.
> While I forget whether they're actually pointers. I guess it fits given
> that the C headers define it as void* and that handles are fundamentally
> different from pointers from an app's point of view.
>
> Under D2, core.sys.windows.windows has it as an alias of void*.
>
> In the WindowsAPI bindings, the definition of HANDLE is versioned to
> this effect.
>
> But there ought to be a better way of dealing with it. Anyone got any
> thoughts? Are there any plans at the moment for the future of the HANDLE
> type?
>
> Stewart.

I don't see a reason to create a "better" way other than abstraction, 
which depending on what you're wanting, has possibly already been made.


More information about the Digitalmars-d mailing list