Click here to Skip to main content
16,007,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
narodachintoo@yahoo.com19-May-08 23:40
narodachintoo@yahoo.com19-May-08 23:40 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
Rajesh R Subramanian19-May-08 23:51
professionalRajesh R Subramanian19-May-08 23:51 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
narodachintoo@yahoo.com20-May-08 0:07
narodachintoo@yahoo.com20-May-08 0:07 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
prasad_som19-May-08 23:55
prasad_som19-May-08 23:55 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
CPallini19-May-08 23:57
mveCPallini19-May-08 23:57 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
narodachintoo@yahoo.com20-May-08 0:10
narodachintoo@yahoo.com20-May-08 0:10 
QuestionRe: NetServerEnum is not working poperly in my application. Pin
CPallini20-May-08 0:21
mveCPallini20-May-08 0:21 
AnswerRe: NetServerEnum is not working poperly in my application. Pin
narodachintoo@yahoo.com20-May-08 0:31
narodachintoo@yahoo.com20-May-08 0:31 
LPSERVER_INFO_101 pServerInfo = NULL,pBuffer = NULL;
DWORD dwEntry = 0,dwEntriesRead,dwTotalEntries;
NET_API_STATUS nStatus;
CString str;
nStatus = NetServerEnum(NULL,
101,
(LPBYTE *) &pBuffer,
MAX_PREFERRED_LENGTH,
&dwEntriesRead,
&dwTotalEntries,
SV_TYPE_ALL,
NULL,
0);
int i=0;
if(nStatus == ERROR_SUCCESS)
{
pServerInfo = pBuffer;
while (dwEntriesRead--)
{
#ifndef _UNICODE
const int SIZE = 0x100;
char szName[SIZE];
int wlen = wcslen(pServerInfo->sv101_name);
WideCharToMultiByte(CP_ACP, 0, pServerInfo->sv101_name, wlen , szName, SIZE, NULL, NULL);
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) szName);
#else
m_listctrl.InsertItem(dwEntry++,(LPCTSTR) pServerInfo->sv101_name);
#endif
this is the full code and thanks for ur immidiate resopnses.
the same which m trying is working fine in c#.net now.
GeneralRe: NetServerEnum is not working poperly in my application. Pin
CPallini20-May-08 0:42
mveCPallini20-May-08 0:42 
GeneralRe: NetServerEnum is not working poperly in my application. Pin
narodachintoo@yahoo.com20-May-08 0:59
narodachintoo@yahoo.com20-May-08 0:59 
QuestionHow To use DLL files in programs Pin
savitri19-May-08 23:08
savitri19-May-08 23:08 
AnswerRe: How To use DLL files in programs Pin
Rajesh R Subramanian19-May-08 23:13
professionalRajesh R Subramanian19-May-08 23:13 
AnswerRe: How To use DLL files in programs Pin
CPallini19-May-08 23:24
mveCPallini19-May-08 23:24 
QuestionRe: How To use DLL files in programs Pin
savitri20-May-08 0:13
savitri20-May-08 0:13 
QuestionRe: How To use DLL files in programs Pin
CPallini20-May-08 0:25
mveCPallini20-May-08 0:25 
QuestionRe: How To use DLL files in programs Pin
savitri20-May-08 0:31
savitri20-May-08 0:31 
AnswerRe: How To use DLL files in programs Pin
CPallini20-May-08 0:48
mveCPallini20-May-08 0:48 
GeneralRe: How To use DLL files in programs Pin
Hamid_RT21-May-08 2:19
Hamid_RT21-May-08 2:19 
GeneralRe: How To use DLL files in programs Pin
CPallini21-May-08 2:33
mveCPallini21-May-08 2:33 
GeneralRe: How To use DLL files in programs Pin
Hamid_RT21-May-08 2:44
Hamid_RT21-May-08 2:44 
GeneralRe: How To use DLL files in programs Pin
CPallini21-May-08 3:00
mveCPallini21-May-08 3:00 
GeneralRe: How To use DLL files in programs Pin
Hamid_RT21-May-08 3:17
Hamid_RT21-May-08 3:17 
GeneralRe: How To use DLL files in programs Pin
CPallini21-May-08 3:38
mveCPallini21-May-08 3:38 
AnswerRe: How To use DLL files in programs Pin
Rajesh R Subramanian20-May-08 0:39
professionalRajesh R Subramanian20-May-08 0:39 
GeneralRe: How To use DLL files in programs Pin
Rajkumar R20-May-08 2:35
Rajkumar R20-May-08 2:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.