Click here to Skip to main content
15,918,123 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Open a external application due tu the document type Pin
includeh1014-Mar-06 4:50
includeh1014-Mar-06 4:50 
AnswerRe: Open a external application due tu the document type Pin
David Crow14-Mar-06 5:40
David Crow14-Mar-06 5:40 
GeneralRe: Open a external application due tu the document type Pin
Alfred Willi16-Mar-06 4:56
Alfred Willi16-Mar-06 4:56 
QuestionBlue Screen Pin
Aqueel14-Mar-06 4:10
Aqueel14-Mar-06 4:10 
Questionview computers in my lan Pin
jspike14-Mar-06 4:04
jspike14-Mar-06 4:04 
AnswerRe: view computers in my lan Pin
David Crow14-Mar-06 4:23
David Crow14-Mar-06 4:23 
GeneralRe: view computers in my lan Pin
jspike14-Mar-06 4:40
jspike14-Mar-06 4:40 
GeneralRe: view computers in my lan Pin
David Crow14-Mar-06 5:35
David Crow14-Mar-06 5:35 
This is code I've used successfully in the past:

WSADATA       wsaData;
DWORD         dwResult,
              dwCount = 0xffffffff,
              dwBufferSize = 16384;
HANDLE        hEnum;
LPVOID        lpBuffer;
LPNETRESOURCE lpNetResource = NULL; 
 
dwResult = WSAStartup(MAKEWORD(1, 1), &wsaData);
if (0 == dwResult)
{
    dwResult = WNetOpenEnum(RESOURCE_CONTEXT, RESOURCETYPE_ANY, NULL, NULL, &hEnum);
    if (NO_ERROR == dwResult && NULL != hEnum)
    {
        lpBuffer = new BYTE[dwBufferSize];
 
        dwResult = WNetEnumResource(hEnum, &dwCount, lpBuffer, &dwBufferSize);
        if (NO_ERROR == dwResult && dwCount > 0)
        {
            lpNetResource = (LPNETRESOURCE) lpBuffer; 

            while (NULL != lpNetResource)
            {
                ...
                lpNetResource++;
            }
        }
 
        delete [] lpBuffer;
    }
 
    dwResult = WSACleanup();
}



"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain

"There is no death, only a change of worlds." - Native American Proverb


GeneralRe: view computers in my lan Pin
jspike14-Mar-06 8:18
jspike14-Mar-06 8:18 
GeneralRe: view computers in my lan Pin
ThatsAlok14-Mar-06 18:28
ThatsAlok14-Mar-06 18:28 
GeneralRe: view computers in my lan Pin
jspike14-Mar-06 20:18
jspike14-Mar-06 20:18 
Questionwchat_t to normal char Pin
RichardS14-Mar-06 4:00
RichardS14-Mar-06 4:00 
GeneralRe: wchat_t to normal char Pin
Michael Dunn14-Mar-06 8:39
sitebuilderMichael Dunn14-Mar-06 8:39 
AnswerRe: wchat_t to normal char Pin
David Crow14-Mar-06 4:26
David Crow14-Mar-06 4:26 
AnswerRe: wchat_t to normal char Pin
Nemanja Trifunovic14-Mar-06 6:52
Nemanja Trifunovic14-Mar-06 6:52 
AnswerRe: wchat_t to normal char Pin
ThatsAlok14-Mar-06 18:29
ThatsAlok14-Mar-06 18:29 
Questionhow to Acesss Remote Database through Internet Pin
J512198214-Mar-06 3:38
J512198214-Mar-06 3:38 
QuestionSetting color of text with printf() Pin
jerry1211a14-Mar-06 3:22
jerry1211a14-Mar-06 3:22 
AnswerRe: Setting color of text with printf() Pin
David Crow14-Mar-06 4:28
David Crow14-Mar-06 4:28 
GeneralRe: Setting color of text with printf() Pin
jerry1211a14-Mar-06 5:31
jerry1211a14-Mar-06 5:31 
QuestionExpress Edition 2005 and VC++6 Pin
thierrypp14-Mar-06 2:56
thierrypp14-Mar-06 2:56 
AnswerRe: Express Edition 2005 and VC++6 Pin
Cedric Moonen14-Mar-06 3:01
Cedric Moonen14-Mar-06 3:01 
GeneralRe: Express Edition 2005 and VC++6 Pin
thierrypp14-Mar-06 3:10
thierrypp14-Mar-06 3:10 
GeneralRe: Express Edition 2005 and VC++6 Pin
Cedric Moonen14-Mar-06 3:16
Cedric Moonen14-Mar-06 3:16 
GeneralRe: Express Edition 2005 and VC++6 Pin
toxcct14-Mar-06 3:16
toxcct14-Mar-06 3:16 

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.