Click to See Complete Forum and Search --> : NETFUNCTION??? HELP!!!!!! URGENT!!!!!!


anuvk
April 9th, 1999, 04:27 AM
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)

April 9th, 1999, 06:49 AM
Hi,

The level shouldn´t be 100 but 0.

Mats Bejedahl