nope, u cannot use the console based application project and then create a win32 application... i guess u can, but u will have to change the compiler setting and other linker options.... some other person gave u a reply on using allocconsole() api, go for that, search it in MSDN... or google it....
User 1057324
Posts
-
Console window in Windows -
Reading from a socketuse the recv function to read from the socket. the recv function can be blocking or non-blocking according to the connection specified... these sockets are known as synchronous sockets but, if u wish to get a notification whenever a message reaches the port , then use asynchronous sockets. there are various options: FD_READ|FD_WRITE|FD_CLOSE|FD_CONNECT , etc etc... u have to use the API: WSAAsyncSelect.... search for the API in MSDN and include the required library and header file.. i think the library is : Ws2_32.lib and header file is winsock2.h , i think winsock.h will also work... u have to create a user defined message: #define MY_MSG WM_USER + 100 OR something.... as u wish... this is one of the arguments in the API call.... we can achieve this also using synchronous sockets , but asynchronous is much more easy....
-
Console window in Windowsits better if u go for a console based application. why do u need WinMain- its better to use main(). but, if u need a win32 application, then u have to start a win32 application project. i u wish to see the current values of various variables, add a listbox and print then all... but, i suggest to use the DEBUGGING procedures inside the IDE... use Ctrl-F10 for running to cursor, etc... u can set WATCHES, etc.... for calling an EXE from inside ur win32 application, use the WinExec or ShellExecute API... or u can go for the CreateProcess API... my suggestion is to use the ShellExecute API.. its very simple and powerfull... one more thing, its better not to use MFC , if ur more into SYstem Side Programming.....
-
sending mails using SMTPi am trying to send a mail to abc@spymac.com using SMTP thourgh TELNET.. these are the procedure i used : 1: connected to port 25(SMTP) of spymac.com: telnet spymac.com 25 2: HELO spymac.com: it return 250 OK. 3: MAIL FROM: deepgeorge@spymac.com: it returned 250 OK. 4: RCPT TO: deepgeorge@spymac.com: it returned 554 relay access denied... i've been searching for the solution for many days now, but in vain.. can anyone help me.... yours truly,