I have a function as follows:
DWORD stats = GetFileAttributesA(path);
return (stats != INVALID_FILE_ATTRIBUTES) && !(stats & FILE_ATTRIBUTE_DIRECTORY) ? 1 : 0;
The problem is that the SQL Connection line is: "Driver = {SQL Server Native Client 10.0}; server = localhost; database = NorthWindDB; Trusted_Connection = yes;" somehow really. It returns 32 (statistics 32 when this input is specified), which is the value of FILE_ATTRIBUTE_ARCHIVE. I cannot filter this because other legit files also return this value.
How to determine if a value indicates a file or connection string?
UPDATE: PathFileExists not working either
source
share