Click here to Skip to main content
15,943,089 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Project type for remote file access Pin
seifwen23-Oct-10 3:57
seifwen23-Oct-10 3:57 
QuestionEnable lan connection for win7 using INetConnection Pin
manojsaxena_mca22-Oct-10 2:31
manojsaxena_mca22-Oct-10 2:31 
JokeRe: Enable lan connection for win7 using INetConnection Pin
josda100022-Oct-10 6:42
josda100022-Oct-10 6:42 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca24-Oct-10 21:29
manojsaxena_mca24-Oct-10 21:29 
AnswerRe: Enable lan connection for win7 using INetConnection Pin
krmed22-Oct-10 7:11
krmed22-Oct-10 7:11 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca24-Oct-10 21:02
manojsaxena_mca24-Oct-10 21:02 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
krmed25-Oct-10 0:36
krmed25-Oct-10 0:36 
AnswerRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan22-Oct-10 23:01
mveRichard MacCutchan22-Oct-10 23:01 
krmed makes a valid suggestion above.

However I also noticed in the code block:
if (wcscmp(pProps->pszwName,wszName) == 0) 
{ 
    if (bEnable) 
        result = (pCon->Connect() == S_OK); 
    else 
        result = (pCon->Disconnect() == S_OK); 

    done = true; 
    result=true;
} 

you are always setting result = true, which is not correct if your Connect() call has failed.
Just say 'NO' to evaluated arguments for diadic functions! Ash

GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca24-Oct-10 21:26
manojsaxena_mca24-Oct-10 21:26 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan24-Oct-10 22:33
mveRichard MacCutchan24-Oct-10 22:33 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca24-Oct-10 23:18
manojsaxena_mca24-Oct-10 23:18 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan25-Oct-10 0:26
mveRichard MacCutchan25-Oct-10 0:26 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca26-Oct-10 2:31
manojsaxena_mca26-Oct-10 2:31 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan26-Oct-10 3:35
mveRichard MacCutchan26-Oct-10 3:35 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca1-Nov-10 1:35
manojsaxena_mca1-Nov-10 1:35 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan2-Nov-10 9:30
mveRichard MacCutchan2-Nov-10 9:30 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
manojsaxena_mca2-Nov-10 22:27
manojsaxena_mca2-Nov-10 22:27 
GeneralRe: Enable lan connection for win7 using INetConnection Pin
Richard MacCutchan3-Nov-10 4:37
mveRichard MacCutchan3-Nov-10 4:37 
QuestionShellExecute Pin
john563222-Oct-10 1:57
john563222-Oct-10 1:57 
AnswerRe: ShellExecute Pin
Nish Nishant22-Oct-10 2:05
sitebuilderNish Nishant22-Oct-10 2:05 
AnswerRe: ShellExecute Pin
Sauro Viti22-Oct-10 2:09
professionalSauro Viti22-Oct-10 2:09 
GeneralRe: ShellExecute Pin
john563222-Oct-10 2:30
john563222-Oct-10 2:30 
GeneralRe: ShellExecute Pin
David Crow22-Oct-10 2:52
David Crow22-Oct-10 2:52 
GeneralRe: ShellExecute Pin
Code-o-mat22-Oct-10 3:07
Code-o-mat22-Oct-10 3:07 
GeneralRe: ShellExecute Pin
john563222-Oct-10 3:12
john563222-Oct-10 3:12 

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.