Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 26-Dec-11 11:13
professional Randor 26-Dec-11 11:13 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton1-Jan-12 1:40
Andy Belton1-Jan-12 1:40 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Randor 1-Jan-12 2:54
professional Randor 1-Jan-12 2:54 
GeneralRe: Translate Logical Drive to Physical Drive Pin
Andy Belton4-Jun-12 4:34
Andy Belton4-Jun-12 4:34 
QuestionIostream processing\flags question Pin
GuimaSun10-Aug-09 12:23
GuimaSun10-Aug-09 12:23 
AnswerRe: Iostream processing\flags question Pin
Stuart Dootson10-Aug-09 21:10
professionalStuart Dootson10-Aug-09 21:10 
GeneralRe: Iostream processing\flags question Pin
GuimaSun11-Aug-09 2:55
GuimaSun11-Aug-09 2:55 
QuestionWait Until Event Occurs Pin
staticv10-Aug-09 4:50
staticv10-Aug-09 4:50 
Hey, I'm doing sockets programming. Pretty much new to it.

The application is a Windows Service, in its ServiceMain() function I call CAsyncSocket's Listen() method, to listen for client connections. But after it starts listening for connections, it'll return and the ServiceMain() function will return and the service is stopped.

What I want to do with this is that, wait until a specific event occurs say WM_QUIT, till than listen for connections. How to do it?

// static member function (callback)
void CNTService::ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv)
{
    // m_Server containts two sockets
    // one for listening and one for accepting connections

    m_Server.StartListening();  // calls Listen method on the listener socket

    // it will return and service will quit
    // which I don't want
}


I'm okay with mixing Win32 and MFC, so if it can be done in Win32 please do tell me too Smile | :)

Top Web Hosting Providers[^]

Do, or do not. There is no 'try'.

AnswerRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 8:32
professionalStuart Dootson10-Aug-09 8:32 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 20:30
staticv10-Aug-09 20:30 
GeneralRe: Wait Until Event Occurs Pin
Stuart Dootson10-Aug-09 21:01
professionalStuart Dootson10-Aug-09 21:01 
GeneralRe: Wait Until Event Occurs Pin
staticv10-Aug-09 21:25
staticv10-Aug-09 21:25 
QuestionSHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 4:43
Nitheesh George10-Aug-09 4:43 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 8:27
professionalStuart Dootson10-Aug-09 8:27 
AnswerRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 9:44
professional Randor 10-Aug-09 9:44 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 10:29
professionalStuart Dootson10-Aug-09 10:29 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 11:15
professional Randor 10-Aug-09 11:15 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Stuart Dootson10-Aug-09 11:23
professionalStuart Dootson10-Aug-09 11:23 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Nitheesh George10-Aug-09 21:38
Nitheesh George10-Aug-09 21:38 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
Randor 10-Aug-09 22:55
professional Randor 10-Aug-09 22:55 
GeneralRe: SHGetFolderPath returns E_FAIL for CSIDL_BITBUCKET Pin
kilt11-Aug-09 6:09
kilt11-Aug-09 6:09 
QuestionCan I destory other thread's child window? Pin
fitatc9-Aug-09 23:35
fitatc9-Aug-09 23:35 
QuestionRe: Can I destory other thread's child window? Pin
Adam Roderick J10-Aug-09 2:32
Adam Roderick J10-Aug-09 2:32 
QuestionInternal buffer of file Pin
trioum9-Aug-09 23:34
trioum9-Aug-09 23:34 
AnswerRe: Internal buffer of file Pin
Cedric Moonen9-Aug-09 23:52
Cedric Moonen9-Aug-09 23:52 

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.