Click here to Skip to main content
15,912,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is what possible??? Pin
Ryan Binns25-May-04 23:48
Ryan Binns25-May-04 23:48 
Generaldebugger out of step with code Pin
bryce25-May-04 21:13
bryce25-May-04 21:13 
GeneralRe: debugger out of step with code Pin
Antony M Kancidrowski25-May-04 22:28
Antony M Kancidrowski25-May-04 22:28 
GeneralRe: debugger out of step with code Pin
MrContact26-May-04 2:39
MrContact26-May-04 2:39 
GeneralRe: debugger out of step with code Pin
bryce26-May-04 13:27
bryce26-May-04 13:27 
GeneralRe: debugger out of step with code Pin
bryce27-May-04 0:51
bryce27-May-04 0:51 
GeneralProblems in Enumerating network Pin
abdul moeed25-May-04 21:12
abdul moeed25-May-04 21:12 
GeneralRe: Problems in Enumerating network Pin
David Crow26-May-04 3:15
David Crow26-May-04 3:15 
I massaged your code a little:

bool GetResources( NETRESOURCE *pNetResource )
{
    DWORD       dwResult;
    NETRESOURCE *NetResource = NULL;
    HANDLE      hEnum;
    
    dwResult = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_ANY, 0, pNetResource, &hEnum);
    if (NO_ERROR == dwResult)
    {
        NETRESOURCE Buffer[750];
        DWORD       Count = 0xFFFFFFFF,
                    BufferSize;
        
        BufferSize = sizeof(Buffer);
 
        do
        {
            dwResult = WNetEnumResource(hEnum, &Count, &Buffer, &BufferSize);
 
            if (NO_ERROR == dwResult || ERROR_MORE_DATA == dwResult)
            {
                for (UINT i = 0; i < Count; i++)
                {
                    if ((Buffer[i].dwUsage & RESOURCEDISPLAYTYPE_DOMAIN) == RESOURCEDISPLAYTYPE_DOMAIN)
                        cout << "Domain " << Buffer[i].lpRemoteName << endl;
                    else if ((Buffer[i].dwUsage & RESOURCEDISPLAYTYPE_SERVER) == RESOURCEDISPLAYTYPE_SERVER)
                        cout << "Server " << Buffer[i].lpRemoteName << endl;
                    else
                        cout << "Machine " << Buffer[i].lpRemoteName << endl;
 
                    if ((Buffer[i].dwUsage & RESOURCEUSAGE_CONTAINER) == RESOURCEUSAGE_CONTAINER)
                        GetResources(&Buffer[i]);
                }
            }
 
        } while (NO_ERROR == dwResult || ERROR_MORE_DATA == dwResult);
 
        dwResult = WNetCloseEnum(hEnum);
    }
 
    return true;
}



"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


GeneralRe: Problems in Enumerating network Pin
abdul moeed26-May-04 19:05
abdul moeed26-May-04 19:05 
GeneralRe: Problems in Enumerating network Pin
David Crow27-May-04 2:31
David Crow27-May-04 2:31 
GeneralRe: Problems in Enumerating network Pin
abdul moeed27-May-04 19:08
abdul moeed27-May-04 19:08 
General1 function multiple buttons Pin
V.25-May-04 21:01
professionalV.25-May-04 21:01 
GeneralRe: 1 function multiple buttons Pin
Johan Rosengren25-May-04 21:32
Johan Rosengren25-May-04 21:32 
GeneralSetting plain text in Outlook Pin
ptrbr25-May-04 20:52
ptrbr25-May-04 20:52 
Questionhow to override the Close or X button of a FormView Pin
elephantstar25-May-04 19:58
elephantstar25-May-04 19:58 
AnswerRe: how to override the Close or X button of a FormView Pin
*Dreamz25-May-04 20:33
*Dreamz25-May-04 20:33 
GeneralRe: how to override the Close or X button of a FormView Pin
elephantstar26-May-04 6:14
elephantstar26-May-04 6:14 
GeneralRe: how to override the Close or X button of a FormView Pin
*Dreamz26-May-04 17:44
*Dreamz26-May-04 17:44 
GeneralRe: how to override the Close or X button of a FormView Pin
elephantstar3-Jun-04 8:24
elephantstar3-Jun-04 8:24 
GeneralRe: how to override the Close or X button of a FormView Pin
*Dreamz3-Jun-04 17:38
*Dreamz3-Jun-04 17:38 
GeneralRPC Pin
Member 115017625-May-04 19:30
Member 115017625-May-04 19:30 
GeneralRe: RPC Pin
David Crow26-May-04 3:18
David Crow26-May-04 3:18 
Generalfirst message Pin
mf1425-May-04 19:18
mf1425-May-04 19:18 
GeneralRe: first message Pin
Roger Allen26-May-04 2:33
Roger Allen26-May-04 2:33 
Questionhow to search through an external file Pin
foxele25-May-04 19:04
foxele25-May-04 19:04 

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.