CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    65

    NETFUNCTION??? HELP!!!!!! URGENT!!!!!!

    Hi,

    I could'nt get the NetServerDiskEnum function working...
    It returns ERROR_INVALID_LEVEL all the time ...
    I found that there is only one level i.e level 100 defined in the documentation..

    This is how I wrote dwon the code.. Any help will be greatly appreciated

    BYTE * bufptr;
    LPWSTR m_server ;
    NET_API_STATUS net_api_status=0;

    if(NetGetDCName(NULL,NULL,(LPBYTE*)&serv)==NERR_Success)
    {
    m_server= new unsigned short [wcslen((LPCWSTR)serv) +5];
    wcscpy (m_server,( const unsigned short *)serv);
    }
    else
    {
    m_server= NULL;
    }

    NetApiBufferFree((LPVOID)serv);
    net_api_status=NetServerDiskEnum((LPTSTR)m_server,100,&bufptr,1024,&dwentriesread,&dwtotalentries,NULL)) == NERR_Success)



  2. #2
    Guest

    Re: NETFUNCTION??? HELP!!!!!! URGENT!!!!!!

    Hi,

    The level shouldn´t be 100 but 0.

    Mats Bejedahl


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured