Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Capture all keyboard input inside a dialog Pin
Anilkumar K V13-Jan-06 0:43
Anilkumar K V13-Jan-06 0:43 
QuestionStrange Question about GetNamedSecurityInfo() API to retrieve DACL of a network share folder Pin
wangdave12-Jan-06 22:37
wangdave12-Jan-06 22:37 
AnswerRe: Strange Question about GetNamedSecurityInfo() API to retrieve DACL of a network share folder Pin
Blake Miller17-Jan-06 7:35
Blake Miller17-Jan-06 7:35 
Questionhow to restrict access to a folder Pin
egrpbala12-Jan-06 22:36
egrpbala12-Jan-06 22:36 
AnswerRe: how to restrict access to a folder Pin
leenmie12-Jan-06 23:28
leenmie12-Jan-06 23:28 
AnswerRe: how to restrict access to a folder Pin
Sebastian Schneider12-Jan-06 23:55
Sebastian Schneider12-Jan-06 23:55 
QuestionHow to get hold of the scrollbar in a frame. Pin
Owner drawn12-Jan-06 22:15
Owner drawn12-Jan-06 22:15 
QuestionCould not open pipe when testing named pipe Pin
MagnusO12-Jan-06 22:09
MagnusO12-Jan-06 22:09 
I try to use named pipes with problem. I test following code:

HANDLE hPipe;<br />
LPVOID lpvMessage;<br />
CHAR chBuf[512];<br />
BOOL fSuccess;<br />
DWORD cbRead, cbWritten, dwMode;<br />
LPTSTR lpszPipename = "\\\\.\\pipe\\mynamedpipe";<br />
<br />
// Try to open a named pipe; wait for it, if necessary. <br />
while (1) <br />
{ <br />
   hPipe = CreateFile( <br />
         lpszPipename,   // pipe name <br />
         GENERIC_READ |  // read and write access <br />
         GENERIC_WRITE, <br />
         0,              // no sharing <br />
         NULL,           // no security attributes<br />
         OPEN_EXISTING,  // opens existing pipe <br />
         0,              // default attributes <br />
         NULL);          // no template file <br />
 <br />
   // Break if the pipe handle is valid. <br />
<br />
   if (hPipe != INVALID_HANDLE_VALUE) <br />
      break; <br />
 <br />
   // Exit if an error other than ERROR_PIPE_BUSY occurs. <br />
 <br />
   if (GetLastError() != ERROR_PIPE_BUSY) <br />
      cout <<"Could not open pipe"; <br />
 <br />
   // All pipe instances are busy, so wait for 20 seconds. <br />
 <br />
   if (! WaitNamedPipe(lpszPipename, 20000) ) <br />
      cout <<"Could not open pipe"; <br />
}<br />

And I only get “Could not open pipe” from both CreateFile and WaitNamedPipe.
The error I get from GetLastError() is 2, "The system cannot find the file specified."
I can give the pipe any name and I get the same error.
AnswerRe: Could not open pipe when testing named pipe Pin
kakan12-Jan-06 22:26
professionalkakan12-Jan-06 22:26 
QuestionHow to start and stop an application Pin
nripun12-Jan-06 22:00
nripun12-Jan-06 22:00 
AnswerRe: How to start and stop an application Pin
Roger Stoltz12-Jan-06 22:34
Roger Stoltz12-Jan-06 22:34 
GeneralRe: How to start and stop an application Pin
Anilkumar K V13-Jan-06 0:46
Anilkumar K V13-Jan-06 0:46 
GeneralRe: How to start and stop an application Pin
Roger Stoltz13-Jan-06 1:24
Roger Stoltz13-Jan-06 1:24 
QuestionWhat is the difference b/w Debug and Release Pin
birajendu12-Jan-06 21:17
birajendu12-Jan-06 21:17 
AnswerRe: What is the difference b/w Debug and Release Pin
Prakash Nadar12-Jan-06 21:38
Prakash Nadar12-Jan-06 21:38 
AnswerRe: What is the difference b/w Debug and Release Pin
toxcct12-Jan-06 21:38
toxcct12-Jan-06 21:38 
AnswerRe: What is the difference b/w Debug and Release Pin
Rage12-Jan-06 21:40
professionalRage12-Jan-06 21:40 
GeneralRe: What is the difference b/w Debug and Release Pin
birajendu12-Jan-06 22:15
birajendu12-Jan-06 22:15 
AnswerRe: What is the difference b/w Debug and Release Pin
normanS13-Jan-06 1:08
normanS13-Jan-06 1:08 
GeneralRe: What is the difference b/w Debug and Release Pin
birajendu13-Jan-06 1:18
birajendu13-Jan-06 1:18 
GeneralRe: What is the difference b/w Debug and Release Pin
Shraddhan23-Jan-06 0:52
Shraddhan23-Jan-06 0:52 
QuestionCommunication between applications Pin
rider cool12-Jan-06 21:03
rider cool12-Jan-06 21:03 
AnswerRe: Communication between applications Pin
Michael Dunn12-Jan-06 21:14
sitebuilderMichael Dunn12-Jan-06 21:14 
AnswerRe: Communication between applications Pin
Rage12-Jan-06 21:44
professionalRage12-Jan-06 21:44 
AnswerRe: Communication between applications Pin
ThatsAlok12-Jan-06 22:48
ThatsAlok12-Jan-06 22:48 

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.