All pastes #76864 Raw Edit

Something

public cpp v1 · immutable
·published 2006-07-02 05:34 UTC
rendered paste body
/*##################################                            #### MAPI.c                     #### ------------------         #### - By:    Mem Dumper        #### - Notes: Hopefully sends a ## ##          email using MAPI. ####                            ##################################*/// Includes//===================#include <windows.h>#include <winbase.h>#include <winuser.h>#include <stdio.h>#include <stdlib.h>#include <mapi.h>int APIENTRY WinMain(HINSTANCE hInstance,                     HINSTANCE hPrevInstance,                     LPSTR     lpCmdLine,                     int       nCmdShow) {	// Variables	//=================	HINSTANCE hLibMAPI;    FARPROC mapiLogon;	FARPROC mapiLogoff;	FARPROC mapiSendMail;	FARPROC mapiFreeBuffer;	LPLHANDLE mapiSession;	HRESULT hRes;	MapiMessage Message;	MapiRecipDesc Recip;	ULONG UlReserved;	ULONG UlRecips;		// Code	//================================================	// load dll	hLibMAPI = LoadLibrary("MAPI32.DLL");	// get functions	mapiLogon = GetProcAddress(hLibMAPI, "MAPILogon"); 	mapiLogoff = GetProcAddress(hLibMAPI, "MAPILogoff"); 	mapiSendMail = GetProcAddress(hLibMAPI, "MAPISendMail");	mapiFreeBuffer = GetProcAddress(hLibMAPI, "MAPIFreeBuffer");	// logo on	hRes = mapiLogon(0, 0, 0, MAPI_NEW_SESSION, 0, &mapiSession); 		// set mail parameters	Recip.ulReserved = UlReserved;	Recip.ulRecipClass = MAPI_TO;	Recip.lpszName = ("Billy");	Recip.lpszAddress =  ("x17@kwandobe.com");	Message.lpszSubject = (LPSTR) "Subject";	Message.lpszNoteText = (LPSTR) "BODY";	Message.nRecipCount = 1L;	Message.lpOriginator = NULL;	Message.nFileCount = 0L;	Message.ulReserved = UlReserved;	Message.lpRecips = &Recip;	// send mail	hRes = mapiSendMail(0 ,0, &Message, MAPI_NEW_SESSION, 0);	if (hRes = SUCCESS_SUCCESS) MessageBox(0,"message sent.","notice!:",0);								// log off	hRes = mapiLogoff(&mapiSession, 0, 0, 0);     mapiFreeBuffer(&Recip); 	mapiFreeBuffer(&Message);		//if (mapiLogon != NULL) Beep(50, 1000);	return 0;}