¿Cómo utilizar VC para escribir aplicaciones que se ejecutan en la red?
El siguiente es el código fuente de un correo electrónico:
#include "stdafx.h"
#include "resource.h"
#include "winsock.h"
#include "windows.h"
#include "windows.h" "
#include "winsock.h"
#include "windows.h"
#include "winsock.h"
#include "windows.h"
#pragma comment(lib, "WSock32.lib")
#define MAX_LOADSTRING 100
#define PUERTO 110
# define SERVERIP "220.181.12.101"
// Variable global:
HINSTANCE hInst; // Instancia actual
TCHAR szTitle [MAX_LOADSTRING].// Texto de la barra de título
TCHAR szWindowClass[MAX_LOADSTRING]; // Texto de la barra de título
// Declaración directa de las funciones contenidas en este módulo de código: p >
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LALLADA DE RESULTADO Acerca de(HWND, UINT, WPARAM, LPARAM);
void recvmail(HWND);
int APIENTRY WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Pon tu código aquí.
MSG msg;
HACCEL hAccelTable;
// Inicializar cadena global
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_ LOADSTRING ) ;
LoadString(hInstance, IDC_MY, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance
// Realizar la inicialización de la aplicación:
if (!InitInstance (hInstance, nCmdShow))
{
devuelve FALSE;
}
hAccelTable = LoadAccelerators( hInstance, (LPCTSTR)IDC_MY);
// Bucle de mensaje principal:
while (GetMessage(amp;msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, amp;msg)))
{
TranslateMessage(amp;msg);
Mensaje de envío(amp;msg);