I am trying and cannot cancel the call to WNetAddConnection2 with CancelSynchronousIo .
The CancelSynchronousIo call succeeds but nothing is canceled.
I am using a 32-bit console application running on Windows 7 x64.
Has anyone done this successfully? Am I doing something stupid? Here is an example console application (which needs to be associated with mpr.lib):
DWORD WINAPI ConnectThread(LPVOID param) { NETRESOURCE nr; memset(&nr, 0, sizeof(nr)); nr.dwType = RESOURCETYPE_ANY; nr.lpRemoteName = L"\\\\8.8.8.8\\bog";
source share