Click here to Skip to main content
15,921,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to disable "Windows + F1" in Windows? Pin
Mohammad Khodaea15-Sep-08 18:22
Mohammad Khodaea15-Sep-08 18:22 
AnswerRe: How to disable "Windows + F1" in Windows? [modified] why 1!!! Pin
Hamid_RT15-Sep-08 20:01
Hamid_RT15-Sep-08 20:01 
GeneralRe: How to disable "Windows + F1" in Windows? Pin
Mohammad Khodaea15-Sep-08 20:27
Mohammad Khodaea15-Sep-08 20:27 
GeneralRe: How to disable "Windows + F1" in Windows? Pin
Hamid_RT15-Sep-08 20:46
Hamid_RT15-Sep-08 20:46 
GeneralRe: How to disable "Windows + F1" in Windows? Pin
Mohammad Khodaea15-Sep-08 21:39
Mohammad Khodaea15-Sep-08 21:39 
GeneralRe: why 1!!! Pin
toxcct15-Sep-08 21:23
toxcct15-Sep-08 21:23 
GeneralRe: why 1!!! Pin
Hamid_RT15-Sep-08 21:28
Hamid_RT15-Sep-08 21:28 
AnswerRe: How to disable "Windows + F1" in Windows? Pin
David Crow16-Sep-08 4:29
David Crow16-Sep-08 4:29 
QuestionHow to display two or three windows simultaneity Pin
tomarrow15-Sep-08 17:04
tomarrow15-Sep-08 17:04 
AnswerRe: How to display two or three windows simultaneity Pin
auralius manurung15-Sep-08 17:30
auralius manurung15-Sep-08 17:30 
GeneralRe: How to display two or three windows simultaneity Pin
Rick York15-Sep-08 18:21
mveRick York15-Sep-08 18:21 
QuestionInteractive Service on Vista Pin
Peter Weyzen15-Sep-08 12:58
Peter Weyzen15-Sep-08 12:58 
AnswerRe: Interactive Service on Vista Pin
Mark Salsbery15-Sep-08 13:19
Mark Salsbery15-Sep-08 13:19 
AnswerRe: Interactive Service on Vista Pin
Mark Salsbery15-Sep-08 13:41
Mark Salsbery15-Sep-08 13:41 
GeneralRe: Interactive Service on Vista Pin
Peter Weyzen15-Sep-08 14:12
Peter Weyzen15-Sep-08 14:12 
GeneralRe: Interactive Service on Vista Pin
Mark Salsbery15-Sep-08 14:28
Mark Salsbery15-Sep-08 14:28 
GeneralRe: Interactive Service on Vista Pin
Peter Weyzen15-Sep-08 15:24
Peter Weyzen15-Sep-08 15:24 
GeneralRe: Interactive Service on Vista Pin
Mark Salsbery16-Sep-08 7:42
Mark Salsbery16-Sep-08 7:42 
Questionnamed pipes problems Pin
ofeririko15-Sep-08 7:42
ofeririko15-Sep-08 7:42 
Hi,

I've implemented a named pipes server according to microsoft's KB: http://msdn.microsoft.com/en-us/library/aa365588(VS.85).aspx[^]

so far so good ..

the next step was to add timeouts handling. i.e in case the server failed, the connected clients should NOT be blocked and should exit with timouts.

according to the documentations, this should be done using the following procedure:


1. create a file:

m_hPipe = CreateFileA(
m_sPipeName, // pipe name
GENERIC_READ | // read and write access
GENERIC_WRITE,
0, // no sharing
NULL, // default security attributes
OPEN_EXISTING, // opens existing pipe
0, // default attributes
NULL); // no template file

.

2. set timeouts and Setup com:

GetCommTimeouts(m_hPipe,&m_comm_timeout);
m_comm_timeout.ReadIntervalTimeout = MAXDWORD;
m_comm_timeout.ReadTotalTimeoutMultiplier = MAXDWORD;
m_comm_timeout.ReadTotalTimeoutConstant = 1;

SetupComm(m_hPipe, BUFSIZE+3,BUFSIZE+3);
DCB cDCB;
GetCommState(m_hPipe, &cDCB);
SetCommState(m_hPipe, &cDCB);

SetCommTimeouts(m_hPipe, &m_comm_timeout);


3. execute the read file command ...

fSuccess = ReadFile( m_hPipe, // pipe handle
chBuf, // buffer to receive reply
BUFSIZE, // size of buffer
&cbRead,// number of bytes read
NULL); // not overlapped


the above procedure should cause the ReadFile to exit after 100 miliseconds, however, it doesnt seems to work

Any suggestions will be wellcomed ...
AnswerRe: named pipes problems Pin
Roger Stoltz15-Sep-08 10:33
Roger Stoltz15-Sep-08 10:33 
QuestionMessage Only Window? Pin
Joseph Marzbani15-Sep-08 7:22
Joseph Marzbani15-Sep-08 7:22 
AnswerRe: Message Only Window? Pin
James R. Twine15-Sep-08 7:30
James R. Twine15-Sep-08 7:30 
AnswerRe: Message Only Window? Pin
auralius manurung15-Sep-08 17:52
auralius manurung15-Sep-08 17:52 
QuestionStudio Tools - Spy++ Pin
john john mackey15-Sep-08 7:20
john john mackey15-Sep-08 7:20 
QuestionRSA Encryption/Decryption Pin
Kdss15-Sep-08 5:28
Kdss15-Sep-08 5:28 

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.