Hello, I want to open a file using say open API or CreateFile API like: hDevice = CreateFile((_T("\\\\.\\C:")),GENERIC_READ, FILE_SHARE_READ ,NULL, OPEN_EXISTING,0,NULL); If this call fails due to security check, What can we do to bypass the security check? As I just want to read the file, I may be given the access to the file, which might already be opened in WRITE mode.
You will not be able to bypass the security check because you are using the API library which enforces security on you by default.