Error returning in WNetConnectionDialog1()
Hello friends,
I am new to network programming and am encountering a bit difficulty in doing so. While calling
WNetConnectionDialog1() API to connect to a network resource, it is failing and returning 66. What does it mean ?
I have collected the network resources and after that populated the CONNECTDLGSTRUCT structure as
lConnDlgStruct.cbStructure =
sizeof(CONNECTDLGSTRUCT);lConnDlgStruct.hwndOwner = NULL;
lConnDlgStruct.lpConnRes = &lTrmnlsRsrcPtr[ i ]; /* lTrmnlsRsrcPtr[ i ] isNETRESOURCE structure */
lConnDlgStruct.dwFlags =0;lRetConnDlg = WNetConnectionDialog1(&lConnDlgStruct);
The value of lRetConnDlg is coming to be 66.
Is it necessary to provide a owner handle ? If so, why ? Even then I have found that providing a owner handle is not resolving the issue. It is returning the same error value.
Then what is the problem ? How to solve it ?
Help needed.

