none
WNetOpenEnum无法解析的外部命令 RRS feed

答案

  • 需要链接API对应的lib。lib名字在SDK文档里可以看到。

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    2010年9月30日 17:02
    版主

全部回复

  •  这个问题怎么解决去 ,

    #include<stdio.h>
    #include<stdlib.h>
    #include<winsock2.h>
    #include<Winnetwk.h>
    #pragma comment (lib,"ws2_32.lib")

    void main()
    {
     struct hostent *host;
     struct in_addr *ptr; // 检索IP地址
     DWORD dwScope = RESOURCE_CONTEXT;
     NETRESOURCE *NetResource = NULL;
     HANDLE hEnum; 
     WNetOpenEnum( dwScope, NULL, NULL, NULL, &hEnum ); //这一行出现以上错误,郁闷中,求解
     WSADATA wsaData;
     WSAStartup(MAKEWORD(1,1),&wsaData);

    }

    2010年9月30日 17:01
  • 需要链接API对应的lib。lib名字在SDK文档里可以看到。

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    2010年9月30日 17:02
    版主
  • #pragma comment (lib,"Mpr.lib")

    加一行就能过编译


    best regards, lu0 For more information, check out lu0s1.3322.org
    2010年9月30日 22:58