digitalmars.D - INVALID_HANDLE_VALUE const?
- Regan Heath (12/12) Jul 13 2007 in std.c.windows.windows we have;
- Lionello Lunesu (4/11) Jul 16 2007 Isn't HANDLE aliased as a void*? I guess you can't have a const (void*)....
in std.c.windows.windows we have; final HANDLE INVALID_HANDLE_VALUE = cast(HANDLE)-1; const DWORD INVALID_SET_FILE_POINTER = cast(DWORD)-1; const DWORD INVALID_FILE_SIZE = cast(DWORD)0xFFFFFFFF; Why is INVALID_HANDLE_VALUE not const like the others? It means when you try to use it like.. class Foo { HANDLE bar = INVALID_HANDLE_VALUE; } you get an error. Regan
Jul 13 2007
Regan Heath wrote:in std.c.windows.windows we have; final HANDLE INVALID_HANDLE_VALUE = cast(HANDLE)-1; const DWORD INVALID_SET_FILE_POINTER = cast(DWORD)-1; const DWORD INVALID_FILE_SIZE = cast(DWORD)0xFFFFFFFF; Why is INVALID_HANDLE_VALUE not const like the others?Isn't HANDLE aliased as a void*? I guess you can't have a const (void*). Just a guess. L.
Jul 16 2007