求救:各位帮我看看错在哪?
网络老鼠 2002-03-30 07:13:39 下面的代码我要他实现IPC$连接功能,
#include "stdafx.h"
#include "windows.h"
int main(int argc, char* argv[])
{
NETRESOURCE netres;
netres.dwScope = RESOURCE_GLOBALNET;
netres.dwType = RESOURCETYPE_ANY;
netres.dwDisplayType = RESOURCEDISPLAYTYPE_GENERIC;
netres.dwUsage = RESOURCEUSAGE_CONNECTABLE;
netres.lpLocalName = NULL;
netres.lpRemoteName =argv[0]; ///这句怎么也通不过///
netres.lpProvider = NULL;
netres.lpComment = NULL;
DWORD dwRetCode = WNetAddConnection2(&netres, argv[1], argv[2], 0);
return 0;
}