Hello everyone!
I've been working on a small project recently,which aimed to work under Windows.The whole idea is to make a programme that alert you when there's a new email in your mail box.
This would be a really easy task if i colud write it as a console app,but i can't...
I want the programme to work as a hidden process so i have to use Windows app.

but it doesn't work properly...it send data when i want to receive it and stops after receiving one message.
i want to :
-connect to a server
-receive it's prompt
-send "USER xxx"
-recv prompt
-send "Pass xxx"
-recv prompt
-send "STAT"
-recv info about mailbox

that's not what i wanted...
I told u i need some advices on how to use winsock WITH GUI. You gave me a tutorial about using sockets with console app.

Waiting for more advices :(

December 7th, 2005, 09:55 AM

SirDice

I hate to break this to you but neither the GUI nor the console has anything to do with the way winsock works.... It works the same for both.

December 7th, 2005, 10:12 AM

piotrek_no_1

This is not true...
When you write a console app you don't have to worry about blocking functions such as recv or connect. When you use windows GUI you can't block the program,and that's why u have to use :

switch(msg){
case ...
case...
case...
}

Windows GUI programs work in a different way simply...

December 7th, 2005, 10:27 AM

SirDice

Quote:

The WSAEventSelect and WSAEnumNetworkEvents functions are provided to accommodate applications such as daemons and services that have no user interface (and hence do not use Windows handles). The WSAEventSelect function behaves exactly like the WSAAsyncSelect function. However, instead of causing a Windows message to be sent on the occurrence of an FD_XXX network event (for example, FD_READ and FD_WRITE), an application-designated event object is set.