CreateFile library error
#2
'CreateFileA' returns a HANDLE, which should be treated as an
_Offset
, but you wrote it as
CreateFileA&
, so the return value is treated as a 32-bit
LONG
.

The C++ compiler isn't allowing you to make the mistake of casting the HANDLE value to a LONG (which is what QB64 will do to make your function definition work) because that's always a bug on 64-bit systems and chops-off the top-half of the 64-bit HANDLE value, making it useless.
Reply


Messages In This Thread
CreateFile library error - by eoredson - 06-05-2023, 05:42 AM
RE: CreateFile library error - by DSMan195276 - 06-05-2023, 05:56 AM
RE: CreateFile library error - by eoredson - 06-05-2023, 10:35 PM
RE: CreateFile library error - by DSMan195276 - 06-05-2023, 10:59 PM
RE: CreateFile library error - by eoredson - 06-05-2023, 11:58 PM
RE: CreateFile library error - by DSMan195276 - 06-06-2023, 12:11 AM
RE: CreateFile library error - by mnrvovrfc - 06-06-2023, 12:05 AM
RE: CreateFile library error - by eoredson - 06-06-2023, 01:34 AM
RE: CreateFile library error - by DSMan195276 - 06-06-2023, 03:15 AM
RE: CreateFile library error - by eoredson - 06-06-2023, 02:14 AM
RE: CreateFile library error - by eoredson - 06-06-2023, 03:43 AM
RE: CreateFile library error - by DSMan195276 - 06-06-2023, 04:02 AM
RE: CreateFile library error - by eoredson - 06-06-2023, 04:08 AM
RE: CreateFile library error - by eoredson - 06-06-2023, 04:29 AM
RE: CreateFile library error - by Ultraman - 06-06-2023, 06:06 AM
RE: CreateFile library error - by DSMan195276 - 06-06-2023, 06:23 AM
RE: CreateFile library error - by Ultraman - 06-07-2023, 09:44 PM
RE: CreateFile library error - by DSMan195276 - 06-07-2023, 10:09 PM
RE: CreateFile library error - by eoredson - 06-08-2023, 01:14 AM
RE: CreateFile library error - by eoredson - 06-08-2023, 03:00 AM
RE: CreateFile library error - by SMcNeill - 06-08-2023, 03:29 AM



Users browsing this thread: 5 Guest(s)