Click here to Skip to main content
15,895,871 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: it does not wok Pin
ThatsAlok3-Jul-05 20:25
ThatsAlok3-Jul-05 20:25 
GeneralRe: it does not wok Pin
2249173-Jul-05 20:32
2249173-Jul-05 20:32 
GeneralRe: it does not wok Pin
ThatsAlok3-Jul-05 21:07
ThatsAlok3-Jul-05 21:07 
GeneralRe: it does not wok Pin
yanping wang3-Jul-05 20:41
yanping wang3-Jul-05 20:41 
AnswerRe: how to enume hosts of my LAN Pin
David Crow4-Jul-05 11:35
David Crow4-Jul-05 11:35 
GeneralRe: how to enume hosts of my LAN Pin
yanping wang4-Jul-05 21:33
yanping wang4-Jul-05 21:33 
GeneralRe: how to enume hosts of my LAN Pin
yanping wang4-Jul-05 21:39
yanping wang4-Jul-05 21:39 
GeneralRe: how to enume hosts of my LAN Pin
yanping wang4-Jul-05 22:09
yanping wang4-Jul-05 22:09 
my demo code is here(using WNet). it can not enume hosts:


#include "../common/initsock.h"

//#include "Ws2tcpip.h"

#include <ws2spi.h>

#include <winnetwk.h>

#include <stdio.h>
#include <windows.h>
#include <iostream>

CInitSock theSock; // to call WSAStartup function

using namespace std;
#include "Iphlpapi.h"
#pragma comment(lib, "Iphlpapi.lib")

#pragma comment(lib, "Mpr.lib")



BOOL EnumRes();

void main()
{

EnumRes();
}


BOOL EnumRes()
{
HANDLE hEnum;
DWORD dw = ::WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, NULL, &hEnum);
if(dw != NO_ERROR)
{
printf(" OpenEnum failed \n");
}

DWORD cCount = -1;
u_char lpBuffer[1024*16];
DWORD cBufferSize = 1024*16;
do
{
dw = ::WNetEnumResource(hEnum, &cCount, lpBuffer, &cBufferSize);
NETRESOURCE *pRes = (NETRESOURCE *)lpBuffer;
if(dw == NO_ERROR)
{
for(int i=0; i
GeneralRe: how to enume hosts of my LAN Pin
David Crow5-Jul-05 2:53
David Crow5-Jul-05 2:53 
GeneralRe: how to enume hosts of my LAN Pin
yanping wang5-Jul-05 4:30
yanping wang5-Jul-05 4:30 
Generaldll is error(picture) Pin
chinakknd3-Jul-05 18:25
chinakknd3-Jul-05 18:25 
GeneralRe: dll is error(picture) Pin
2249173-Jul-05 18:29
2249173-Jul-05 18:29 
GeneralRe: dll is error(picture) Pin
chinakknd3-Jul-05 18:46
chinakknd3-Jul-05 18:46 
GeneralRe: dll is error(picture) Pin
2249173-Jul-05 19:27
2249173-Jul-05 19:27 
GeneralOutlook express add in Pin
Wessam Fathi3-Jul-05 14:13
Wessam Fathi3-Jul-05 14:13 
GeneralRe: Outlook express add in Pin
2249173-Jul-05 17:51
2249173-Jul-05 17:51 
Generalerror C2146 Pin
John R. Shaw3-Jul-05 8:08
John R. Shaw3-Jul-05 8:08 
GeneralRe: error C2146 Pin
PJ Arends3-Jul-05 8:26
professionalPJ Arends3-Jul-05 8:26 
GeneralRe: error C2146 Pin
John R. Shaw3-Jul-05 8:31
John R. Shaw3-Jul-05 8:31 
GeneralRe: error C2146 Pin
Jose Lamas Rios3-Jul-05 9:12
Jose Lamas Rios3-Jul-05 9:12 
GeneralRe: error C2146 Pin
John R. Shaw5-Jul-05 16:51
John R. Shaw5-Jul-05 16:51 
GeneralRe: error C2146 Pin
Jose Lamas Rios5-Jul-05 17:23
Jose Lamas Rios5-Jul-05 17:23 
GeneralRe: error C2146 Pin
John R. Shaw5-Jul-05 18:09
John R. Shaw5-Jul-05 18:09 
GeneralDirectShow Audio-Video Synchronization Pin
Alexander M.,3-Jul-05 6:19
Alexander M.,3-Jul-05 6:19 
GeneralRe: DirectShow Audio-Video Synchronization Pin
stephen_young8-Jul-05 20:47
stephen_young8-Jul-05 20:47 

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.