⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgemit.h

📁 c语言编程软件vc6.0中文绿色版_vc6.0官方下载
💻 H
📖 第 1 页 / 共 2 页
字号:
// --msgemit.h--------------------------------------------------------------
//
// API entry points for the msgemit static link library.
// Contains helper functions for converting MAPI messages to 
// 822-style headers and 822-style ASCII headers to MAPI messages.
//
// Copyright (C) Microsoft Corp., 1986-1996.  All rights reserved.
//
// ---------------------------------------------------------------------------

#ifndef _MSGEMIT_H
#define _MSGEMIT_H

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

// Constants for the binary encode and decode functions.
const ULONG nBytesEncodePerLine     =   24; // # of bytes encoded per line
const ULONG nCharsPerEncodedByte    =   3;  // # of chars written per encoded byte

// Convenient macro for determining the number of data bytes (not
// counting the null terminator) in a string.
static __inline ULONG cbStrBytes(
    IN LPCSTR pszString)     // string pointer
{
    return (lstrlenA(pszString));
}

//$--HrCreateDateTimeString@-------------------------------------------------
//
// DESCRIPTION: Builds a date & time (UT) created string for a MAPI message file time
//
// INPUT:       lpFileTime  --  file time structure pointer (UT)
//
// OUTPUT:      lppTimeString   --  Pointer to time string output buffer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if bad input,
//                              E_OUTOFMEMORY if memory problems,
//                              E_FAIL otherwise
//
// ---------------------------------------------------------------------------

HRESULT HrCreateDateTimeStringW(
    IN LPFILETIME lpFileTime,      // file time structure pointer
    OUT LPWSTR * lppTimeString);   // pointer to time string buffer

HRESULT HrCreateDateTimeStringA(
    IN LPFILETIME lpFileTime,      // file time structure pointer
    OUT LPSTR * lppTimeString);    // pointer to time string buffer

#ifdef UNICODE
#define HrCreateDateTimeString  HrCreateDateTimeStringW
#else
#define HrCreateDateTimeString  HrCreateDateTimeStringA
#endif

//$--HrCreateImportanceString------------------------------------------------
//
// DESCRIPTION: Creates an message importance string from a MAPI message importance value
//
// INPUT:       ulImportance    --  message's PR_IMPORTANCE value
//              
// OUTPUT:      lppImportance --  Pointer to importance string buffer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,
//                              E_OUTOFMEMORY if memory problems,
//                              E_FAIL otherwise.
//
// ---------------------------------------------------------------------------

HRESULT HrCreateImportanceString(                   //  RETURNS:    HRESULT
                    IN ULONG ulImportance,            // message's PR_IMPORTANCE value
                    OUT LPSTR * lppImportance);  // pointer to importance string buffer

//$--HrEmitTagDataLine-------------------------------------------------------
//
// DESCRIPTION: Emits a line constructed from a static tag and dynamic
//              data to the specified stream.
//
// INPUT:       lpszTag --  tag portion of line
//              lpData      --  data portion of line    (may be "")
//              lpStream    --  stream to write line to
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,d
//                              E_FAIL otherwise
//
// ---------------------------------------------------------------------------

HRESULT HrEmitTagDataLine(   
        IN LPCSTR lpszTag,      // static portion of line
        IN LPSTR lpData,        // dynamic portion of line
        IN LPSTREAM lpStream);  // stream to write line to

//$--HrCreatePriorityString-------------------------------------------------------
//
// DESCRIPTION: Creates message priority data string from a MAPI priority value
//
// INPUT:       ulPriority  --  message's PR_PRIORITY value
//
// OUTPUT:      lppPriorityString --  message priority data string pointer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,
//                              E_OUTOFMEMORY if memory problems
//                              E_FAIL otherwise
//
// ---------------------------------------------------------------------------

HRESULT HrCreatePriorityString(   
        IN ULONG ulPriority,            // message's PR_PRIORITY value
        OUT LPSTR * lppPriorityString); // message priority data string pointer

//$--HrEDKEncodeBinaryStreamDataToStream-----------------------------------------------
//
// DESCRIPTION: Copies binary data from an input stream or
//              specified output stream,
//              encoding each byte as a two-character
//              hexadecimal ASCII representation of the byte.
//              E.g. 255 becomes 'FF'.
//
// INPUT:       
//              lpStreamIn  --  input stream pointer
//              lpStreamOut --  output stream pointer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,
//                              E_FAIL otherwise
//
// ---------------------------------------------------------------------------
HRESULT HrEDKEncodeBinaryStreamDataToStream(               
                    IN LPSTREAM lpStreamIn,     // input stream pointer
                    IN LPSTREAM lpStreamOut);   // output stream pointer

//$--HrCreateExternalTraceString------------------------------------------------
//
// DESCRIPTION: Creates a string from a message's external trace information.
//
// INPUT:       lAction --  trace action
//              lpCountry   --  country
//              lpADMDName  --  ADMD name
//              lpPRMDId    --  PRMD identifier
//          
// OUTPUT:      lppTraceString  --  pointer to trace information string buffer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,
//                              E_OUTOFMEMORY if memory problems
//                              E_FAIL otherwise,
//
// -----------------------------------------------------------------------------

HRESULT HrCreateExternalTraceString(        
    IN LONG lAction,             // trace action
    IN LPSTR lpCountry,          // country name
    IN LPSTR lpADMDName,         // ADMD name
    IN LPSTR lpPRMDId,           // PRMD identifier    
    OUT LPSTR * lppTraceString); // trace information string pointer

//$--HrCreateInternalTraceString------------------------------------------------
//
// DESCRIPTION: Creates a string from a message's internal trace information.
//
// INPUT:       lAction		--  trace action
//              lpCountry   --  country
//              lpADMDName  --  ADMD name
//              lpPRMDId    --  PRMD identifier
//				lpMTAName	--  MTA name
//          
// OUTPUT:      lppTraceString  --  pointer to trace information string buffer
//
// RETURNS:     HRESULT     --  NOERROR if successful,
//                              E_INVALIDARG if invalid parameter,
//                              E_OUTOFMEMORY if memory problems
//                              E_FAIL otherwise,
//
// -----------------------------------------------------------------------------

HRESULT HrCreateInternalTraceString(        
    IN LONG lAction,             // trace action
    IN LPSTR lpCountry,          // country name
    IN LPSTR lpADMDName,         // ADMD name
    IN LPSTR lpPRMDId,           // PRMD identifier    
	IN LPSTR lpMTAName,			 // MTA name
    OUT LPSTR * lppTraceString); // trace information string pointer

//$--HrGetRecipientList------------------------------------------
//
// DESCRIPTION: Utility function which retrieves columns 
// desired from a MAPI recipient table.
//
// INPUT:   lpMessage   --  pointer to MAPI message
//          lpPropTags  --  list of columns (properties) to retrieve
//          
// OUTPUT:  lppRows --  pointer to array of rows returned pointer.
//
// RETURNS: HRESULT --  NOERROR if successful,
//                      E_INVALIDARG if bad input,
//                      E_FAIL otherwise
//
// -------------------------------------------------------------
HRESULT HrGetRecipientList(           
        IN LPMESSAGE lpMessage,         // MAPI message pointer
        IN LPSPropTagArray lpPropTags,  // properties (columns) desired
        OUT LPSRowSet * lppRows);       // pointer to rows returned

//$--HrParseTagAndData-------------------------------------------------------
//
// DESCRIPTION: Parse ASCII 822-style header line into
//              tag and data components.
//
// INPUT:       lpStream    --  stream pointer to read from
//
// OUTPUT:      pcbRead --  number of bytes read from stream
//              ppTag   --  pointer to tag buffer
//              ppData  --  pointer to data buffer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -