util.h 2.81 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 *             MAPI utility header file
 *
 * Copyright 2009 Owen Rudge for CodeWeavers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef _MAPI_UTIL_H

#define _MAPI_UTIL_H

25 26 27
#include <mapi.h>
#include <mapix.h>

28 29
extern void load_mapi_providers(void) DECLSPEC_HIDDEN;
extern void unload_mapi_providers(void) DECLSPEC_HIDDEN;
30

31 32 33 34 35 36 37 38 39 40 41 42 43
typedef struct MAPI_FUNCTIONS {
    LPMAPIADDRESS        MAPIAddress;
    LPMAPIDELETEMAIL     MAPIDeleteMail;
    LPMAPIDETAILS        MAPIDetails;
    LPMAPIFINDNEXT       MAPIFindNext;
    LPMAPIINITIALIZE     MAPIInitialize;
    LPMAPILOGOFF         MAPILogoff;
    LPMAPILOGON          MAPILogon;
    LPMAPILOGONEX        MAPILogonEx;
    LPMAPIREADMAIL       MAPIReadMail;
    LPMAPIRESOLVENAME    MAPIResolveName;
    LPMAPISAVEMAIL       MAPISaveMail;
    LPMAPISENDMAIL       MAPISendMail;
44
    LPMAPISENDMAILW      MAPISendMailW;
45 46
    LPMAPISENDDOCUMENTS  MAPISendDocuments;
    LPMAPIUNINITIALIZE   MAPIUninitialize;
47

48 49 50 51 52 53 54 55 56 57 58 59 60 61
    VOID     (WINAPI *DeinitMapiUtil)             (void);
    HRESULT  (WINAPI *DllCanUnloadNow)            (void);
    HRESULT  (WINAPI *DllGetClassObject)          (REFCLSID, REFIID, LPVOID *);
    BOOL     (WINAPI *FGetComponentPath)          (LPCSTR, LPCSTR, LPSTR, DWORD, BOOL);
    HRESULT  (WINAPI *MAPIAdminProfiles)          (ULONG, LPPROFADMIN *);
    SCODE    (WINAPI *MAPIAllocateBuffer)         (ULONG, LPVOID *);
    SCODE    (WINAPI *MAPIAllocateMore)           (ULONG, LPVOID, LPVOID *);
    ULONG    (WINAPI *MAPIFreeBuffer)             (LPVOID);
    LPMALLOC (WINAPI *MAPIGetDefaultMalloc)       (void);
    HRESULT  (WINAPI *MAPIOpenLocalFormContainer) (LPVOID *);
    HRESULT  (WINAPI *HrThisThreadAdviseSink)     (LPMAPIADVISESINK, LPMAPIADVISESINK*);
    HRESULT  (WINAPI *HrQueryAllRows)             (LPMAPITABLE, LPSPropTagArray, LPSRestriction, LPSSortOrderSet, LONG, LPSRowSet *);
    HRESULT  (WINAPI *OpenStreamOnFile)           (LPALLOCATEBUFFER, LPFREEBUFFER, ULONG, LPWSTR, LPWSTR, LPSTREAM *);
    SCODE    (WINAPI *ScInitMapiUtil)             (ULONG ulReserved);
62 63
} MAPI_FUNCTIONS;

64 65
extern MAPI_FUNCTIONS mapiFunctions DECLSPEC_HIDDEN;
extern HINSTANCE hInstMAPI32 DECLSPEC_HIDDEN;
66

67
#endif