06-06-2023, 06:23 AM
(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
CustomTypewould 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
CustomTypewould 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..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:
Erik.
Code: (Select All)
DWORD GetFileAttributesA(
[in] LPCSTR lpFileName
);
DWORDand the parameter is an
LPCSTR.