In linux, when stat() is used with broken link files, it fails with -1. So I used lstat() which succeeded.
For the same case in windows, _stat() fails with broken shortcuts, but there is no _lstat() in windows. Please help to find the alternative for lstat() in windows.
GetFileAttributes or GetFileAttributesEx probably (if I understood
statandlstatright). Quoting from the docs: