Why does CreateSymbolicLink() succeed, but the gen

2019-07-25 12:09发布

问题:

#include <windows.h>

int main()
{
    CreateSymbolicLink(L"d:\\symbolic_link_to_notepad.exe", 
        L"c:\\windows\\notepad.exe", 0); // Success!
}

However, when I double-click d:\symbolic_link_to_notepad.exe to start notepad, an error message box pops and says the path is not found.

What's the root cause?