CreateFile library error
#16
(06-06-2023, 06:06 AM)Ultraman Wrote: I'd recommend using Declare CustomType Library instead. Or, if you want to avoid compilation errors entirely, declare the DLL that contains that function rather than trying to use the headers.
I would definitely not recommend that. In this case all
CustomType
would do is allow you to ignore the C++ function declaration already present from the header, you should only do that if it's necessary. In this case, the compilation error is because eoredson had a legitimate bug in his program and as a consequence it would not work on 64-bit. Using
CustomType
would have allowed it to compile, but not actually fix the bug. It provides a false sense of security and you shouldn't be using it unless actually necessary.

(06-06-2023, 04:29 AM)eoredson Wrote: I need to know because I might have the same problem with GetFileAttribute as I do with CreateFile..

Erik.
Again, read the Microsoft documentation, it tells you the exact information you're looking for. The GetFileAttributeA function documentation is here. The provided syntax is this:

Code: (Select All)
DWORD GetFileAttributesA(
  [in] LPCSTR lpFileName
);
The return type is a
DWORD
and the parameter is an
LPCSTR
.
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: 1 Guest(s)