#include "idl_types.h" import "misc.idl"; /* http://support.microsoft.com/default.aspx?scid=KB;en-us;q159298 Any UUID starting with: A4 - store F5 - directory */ [ uuid("99e64010-b032-11d0-97a4-00c04fd6551d"), pointer_default(unique), version(3.0) ] interface exchange_store_admin3 { void ec_store_admin3_dummy(); } [ uuid("89742ace-a9ed-11cf-9c0c-08002be7ae86"), pointer_default(unique), version(2.0) ] interface exchange_store_admin2 { void ec_store_admin2_dummy(); } [ uuid("a4f1db00-ca47-1067-b31e-00dd010662da"), pointer_default(unique), version(1.0) ] interface exchange_store_admin1 { void ec_store_admin1_dummy(); } [ uuid("1544f5e0-613c-11d1-93df-00c04fd7bd09"), pointer_default(unique), version(1.0), helpstring("Exchange 2003 Directory Request For Response") ] interface exchange_ds_rfr { /*****************/ /* Function 0x00 */ void RfrGetNewDSA(); /*****************/ /* Function 0x01 */ void RfrGetFQDNFromLegacyDN(); } [ uuid("f930c514-1215-11d3-99a5-00a0c9b61b04"), helpstring("System Attendant Cluster Interface"), pointer_default(unique), version(1.0) ] interface exchange_sysatt_cluster { void sysatt_cluster_dummy(); } /* [83d72bf0-0d89-11ce-b13f-00aa003bac6c] MS Exchange System Attendant Private Interface */ [ uuid("469d6ec0-0d87-11ce-b13f-00aa003bac6c"), pointer_default(unique), helpstring("Exchange 5.5 System Attendant Request for Response") ] interface exchange_system_attendant { void sysatt_dummy(); } [ uuid("9e8ee830-4559-11ce-979b-00aa005ffebe"), pointer_default(unique), version(2.0), helpstring("Exchange 5.5 MTA") ] interface exchange_mta { /*****************/ /* Function 0x00 */ void MtaBind(); /*****************/ /* Function 0x01 */ void MtaBindAck(); } [ uuid("f5cc59b4-4264-101a-8c59-08002b2f8426"), pointer_default(unique), version(21.0), helpstring("Exchange 5.5 DRS") ] interface exchange_drs { /*****************/ /* Function 0x00 */ void ds_abandon(); /*****************/ /* Function 0x01 */ void ds_add_entry(); void ds_bind(); void ds_compare(); void ds_list(); void ds_modify_entry(); void ds_modify_rdn(); void ds_read(); void ds_receive_result(); void ds_remove_entry(); void ds_search(); void ds_unbind(); void ds_wait(); void dra_replica_add(); void dra_replica_delete(); void dra_replica_synchronize(); void dra_reference_update(); void dra_authorize_replica(); void dra_unauthorize_replica(); void dra_adopt(); void dra_set_status(); void dra_modify_entry(); void dra_delete_subref(); } [ uuid("f5cc5a7c-4264-101a-8c59-08002b2f8426"), version(21.0), pointer_default(unique), helpstring("Exchange 5.5 XDS") ] interface exchange_xds { void xds_dummy(); } [ uuid("38a94e72-a9bc-11d2-8faf-00c04fa378ff"), pointer_default(unique), version(1.0) ] interface exchange_mta_qadmin { void exchange_mta_qadmin(); } [ uuid("0e4a0156-dd5d-11d2-8c2f-00c04fb6bcde"), pointer_default(unique), version(1.0) ] interface exchange_store_information { void exchange_store_information_dummy(); } [ uuid("f5cc5a18-4264-101a-8c59-08002b2f8426"), endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:[]"), pointer_default(unique), version(56.0), helpstring("Exchange 5.5 Name Service Provider") ] interface exchange_nsp { #include "mapitags_enum.h" #include "mapicodes_enum.h" /*****************/ /* Function 0x00 */ /* ** MAPIUID explanation: ** http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mapi/html/c42065c2-b1f5-4930-84a6-6ef90c6162d0.asp */ typedef struct _MAPIUID{ uint8 ab[16]; } MAPIUID; /* ** input locale combination: ** http://www.microsoft.com/globaldev/reference/win2k/setup/lcid.mspx */ typedef struct { uint32 language; uint32 method; } input_locale; typedef [flag(NDR_NOALIGN)] struct { uint32 handle; uint32 flag; MAPIUID service_provider; uint32 codepage; /* CPID */ input_locale input_locale; /* LCID */ } MAPI_SETTINGS; typedef struct { [unique, length_is(cValues - 1), size_is(cValues - 1)] MAPITAGS *aulPropTag; uint32 cValues; } SPropTagArray; typedef struct { [length_is(cValues - 1), size_is(cValues - 1)] uint32 *value; uint32 cValues; } instance_key; /*****************/ /* Function 0x00 */ MAPISTATUS NspiBind( [in] uint32 unknown, [in] MAPI_SETTINGS *settings, [in,out,unique] GUID *mapiuid, [out] policy_handle *handle ); /*****************/ /* Function 0x01 */ MAPISTATUS NspiUnbind( [in, out] policy_handle *handle, [in] uint32 status ); /*****************/ /* Function 0x02 */ MAPISTATUS NspiUpdateStat( [in] policy_handle *handle, [in] uint32 dwAlignPad, [in,out] MAPI_SETTINGS settings, [in,out] uint32 unknown ); /*****************/ /* Function 0x03 */ MAPISTATUS NspiQueryRows( [in] policy_handle *handle, [in] uint32 flag, [in,out] MAPI_SETTINGS *settings, [in] uint32 ikey_cnt, [in][size_is(ikey_cnt)][unique] uint32 *instance_key, [in] uint32 lRows, [in] SPropTagArray *REQ_properties, [out,ref] SRowSet **RowSet ); void NspiSeekEntries(); /*****************/ /* Function 0x05 */ /* Restriction types */ #define RES_AND 0 #define RES_OR 1 #define RES_NOT 2 #define RES_CONTENT 3 #define RES_PROPERTY 4 #define RES_COMPAREPROPS 5 #define RES_BITMASK 6 #define RES_SIZE 7 #define RES_EXIST 8 #define RES_SUBRESTRICTION 9 #define RES_COMMENT 10 typedef struct { uint32 relop; MAPITAGS ulPropTag; SPropValue *lpProp; } SPropertyRestriction; typedef struct { uint32 cRes; [size_is(cRes)][unique]SRestriction *lpRes; } SAndRestriction; typedef [switch_type(uint32)] union { [case(RES_AND) ] SAndRestriction resAnd; // [case(RES_OR) ] SOrRestriction resOr; // [case(RES_NOT) ] SNotRestriction resNot; // [case(RES_CONTENT) ] SContentRestriction resContent; [case(RES_PROPERTY) ] SPropertyRestriction resProperty; // [case(RES_COMPAREPROPS) ] SComparePropsRestriction resCompareProps; // [case(RES_BITMASK) ] SBitMaskRestriction resBitMask; // [case(RES_SUBRESTRICTION)] SSubRestriction resSub; // [case(RES_SIZE) ] SSizeRestriction resSize; // [case(RES_EXIST) ] SExistRestriction resExist; } SRestriction_CTR; typedef [public] struct _SRestriction{ uint32 rt; [switch_is(rt)] SRestriction_CTR res; } SRestriction; MAPISTATUS NspiGetMatches( [in] policy_handle *handle, [in] uint32 unknown1, [in,out] MAPI_SETTINGS *settings, [in][unique] SPropTagArray *PropTagArray, [in] uint32 unknown2, [in][unique] SRestriction *restrictions, [in] uint32 unknown3, [out] instance_key *instance_key, [in][unique] SPropTagArray *REQ_properties, [out,ref] SRowSet **RowSet ); void NspiResortRestriction(); /*****************/ /* Function 0x07 */ typedef struct { [string,charset(DOS)] uint8 *str; } NAME_STRING; MAPISTATUS NspiDNToEph( [in] policy_handle *handle, [in] uint32 flag, [in] uint32 size, [in][size_is(size)] NAME_STRING server_dn[], [out] instance_key *instance_key ); void NspiGetPropList(); /*****************/ /* Function 0x09 */ MAPISTATUS NspiGetProps( [in] policy_handle *handle, [in] uint32 flag, [in] MAPI_SETTINGS *settings, [in] SPropTagArray *REQ_properties, [out] SRow **REPL_values ); void NspiCompareDNTs(); void NspiModProps(); #define PT_UNSPECIFIED 0x0000 #define PT_NULL 0x0001 #define PT_I2 0x0002 #define PT_LONG 0x0003 #define PT_R4 0x0004 #define PT_DOUBLE 0x0005 #define PT_CURRENCY 0x0006 #define PT_APPTIME 0x0007 #define PT_ERROR 0x000a /* means the given attr contains no value */ #define PT_BOOLEAN 0x000b #define PT_OBJECT 0x000d #define PT_I8 0x0014 #define PT_STRING8 0x001e #define PT_UNICODE 0x001f #define PT_SYSTIME 0x0040 #define PT_CLSID 0x0048 #define PT_SVREID 0x00fb #define PT_SRESTRICT 0x00fd #define PT_BINARY 0x0102 /* Multi-valued properties */ #define PT_MV_I2 0x1002 #define PT_MV_LONG 0x1003 #define PT_MV_R4 0x1004 #define PT_MV_DOUBLE 0x1005 #define PT_MV_CURRENCY 0x1006 #define PT_MV_APPTIME 0x1007 #define PT_MV_I8 0x1014 #define PT_MV_STRING8 0x101e #define PT_MV_TSTRING 0x101e #define PT_MV_UNICODE 0x101f #define PT_MV_SYSTIME 0x1040 #define PT_MV_CLSID 0x1048 #define PT_MV_BINARY 0x1102 /*****************/ /* Function 0x0c */ typedef struct { uint32 cb; [size_is(cb)][unique] uint8 *lpb; } SBinary; typedef struct { uint32 dwLowDateTime; uint32 dwHighDateTime; } FILETIME; typedef struct { uint32 cValues; [size_is(cValues)] uint16 *lpi; } SShortArray; typedef struct { uint32 cValues; [size_is(cValues)] uint32 *lpl; } MV_LONG_STRUCT; typedef struct { [flag(STR_ASCII|STR_SIZE4|STR_LEN4)] string lppszA; } LPSTR; typedef struct { uint32 cValues; [size_is(cValues)] LPSTR **strings; } SLPSTRArray; typedef struct { uint32 cValues; [size_is(cValues)] SBinary *lpbin; } SBinaryArray; typedef [flag(NDR_NOALIGN)] struct { uint32 cValues; [size_is(cValues)] uint32 *lpguid; } SGuidArray; typedef struct { uint32 cValues; [size_is(cValues)] uint32 *lpi; } MV_UNICODE_STRUCT; typedef struct { uint32 cValues; [size_is(cValues)] FILETIME *lpft; } SDateTimeArray; typedef [switch_type(uint32)] union { [case(PT_I2)] uint16 i; [case(PT_LONG)] uint32 l; [case(PT_DOUBLE)] dlong dbl; [case(PT_BOOLEAN)] uint8 b; [case(PT_I8)] dlong d; [case(PT_STRING8)][unique][string,charset(DOS)] uint8 *lpszA; [case(PT_BINARY)] SBinary bin; [case(PT_UNICODE)] [string,charset(UTF16)] uint16 *lpszW; [case(PT_CLSID)] MAPIUID *lpguid; [case(PT_SYSTIME)] FILETIME ft; [case(PT_ERROR)] MAPISTATUS err; [case(PT_MV_I2)] SShortArray MVi; [case(PT_MV_LONG)] MV_LONG_STRUCT MVl; [case(PT_MV_STRING8)] SLPSTRArray MVszA; [case(PT_MV_BINARY)] SBinaryArray MVbin; [case(PT_MV_CLSID)] SGuidArray MVguid; [case(PT_MV_UNICODE)] MV_UNICODE_STRUCT MVszW; [case(PT_MV_SYSTIME)] SDateTimeArray MVft; [case(PT_NULL)] uint32 null; [case(PT_OBJECT)] uint32 object; } SPropValue_CTR; typedef [public]struct { MAPITAGS ulPropTag; uint32 dwAlignPad; [switch_is(ulPropTag & 0xFFFF)] SPropValue_CTR value; } SPropValue; typedef struct { uint32 ulAdrEntryPad; uint32 cValues; [size_is(cValues)][unique] SPropValue *lpProps; } SRow; typedef [public] struct { uint32 cRows; [size_is(cRows)] SRow aRow[*]; } SRowSet; MAPISTATUS NspiGetHierarchyInfo( [in] policy_handle *handle, [in] uint32 unknown1, [in] MAPI_SETTINGS *settings, [in,out] uint32 *unknown2, [out] SRowSet **RowSet ); void NspiGetTemplateInfo(); void NspiModLInkAtt(); void NspiDeleteEntries(); void NspiQueryColumns(); void NspiGetNamesFromIDs(); void NspiGetIDsFromNames(); /*****************/ /* Function 0x13 */ typedef [v1_enum, flag(NDR_PAHEX)] enum { MAPI_UNRESOLVED = 0x0, MAPI_AMBIGUOUS = 0x1, MAPI_RESOLVED = 0x2 } flaglist_flags; typedef [flag(NDR_NOALIGN)]struct { uint32 dwAlignPad; uint32 cFlags; uint32 offset; uint32 length; flaglist_flags ulFlags[cFlags]; } FlagList; typedef struct { uint32 cEntries; uint32 count; [string,charset(DOS)] uint8 *recipient[count]; } names; MAPISTATUS NspiResolveNames( [in] policy_handle *handle, [in] uint32 dwAlignPad, [in,ref] MAPI_SETTINGS *settings, [in,ref] SPropTagArray *SPropTagArray, [in,ref] names *recipients, [out,ref]FlagList **flags, [out,ptr]SRowSet *RowSet ); typedef struct { uint32 cEntries; uint32 count; [string,charset(UTF16)] uint16 *recipient[count]; } namesW; MAPISTATUS NspiResolveNamesW( [in] policy_handle *handle, [in] uint32 dwAlignPad, [in,ref] MAPI_SETTINGS *settings, [in,ref] SPropTagArray *SPropTagArray, [in,ref] namesW *recipients, [out,ref]FlagList **flags, [out,ptr]SRowSet *RowSet ); } [ uuid("a4f1db00-ca47-1067-b31f-00dd010662da"), pointer_default(unique), endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:"), version(0.82), helpstring("Exchange 5.5 EMSMDB") ] interface exchange_emsmdb { /*****************/ /* Function 0x00 */ MAPISTATUS EcDoConnect( [out] policy_handle *handle, [in,string,charset(DOS)] uint8 name[], [in] uint32 unknown1[3], [in] uint32 code_page, [in] input_locale input_locale, [in] uint32 unknown2, [in] uint16 unknown3, [out] uint32 unknown4[3], [out] uint16 *session_nb, [out,unique,string,charset(DOS)]uint8 *org_group, [out,unique,string,charset(DOS)]uint8 *user, [out] uint16 store_version[3], [in,out] uint16 emsmdb_client_version[3], [in,out] uint32 *alloc_space ); /*****************/ /* Function 0x01 */ MAPISTATUS EcDoDisconnect( [in,out] policy_handle *handle ); /*****************/ /* Function 0x02 */ /* EcDoRpc opnums */ typedef [public, enum8bit, flag(NDR_PAHEX)] enum { MAPI_STORE = 0x1, MAPI_ADDRBOOK = 0x2, MAPI_FOLDER = 0x3, MAPI_ABCONT = 0x4, MAPI_MESSAGE = 0x5, MAPI_MAILUSER = 0x6, /* Individual Recipient */ MAPI_ATTACH = 0x7, MAPI_DISTLIST = 0x8, MAPI_PROFSECT = 0x9, MAPI_STATUS = 0xA, MAPI_SESSION = 0xB, MAPI_FORMINFO = 0xC } MAPI_OBJTYPE; typedef [public, v1_enum, flag(NDR_PAHEX)] enum { RightsNone = 0x00000000, RightsReadItems = 0x00000001, RightsCreateItems = 0x00000002, RightsEditOwn = 0x00000008, RightsDeleteOwn = 0x00000010, RightsEditAll = 0x00000020, RightsDeleteAll = 0x00000040, RightsCreateSubfolders = 0x00000080, RightsFolderOwner = 0x00000100, RightsFolderContact = 0x00000200, RoleNone = 0x00000400, RoleReviewer = 0x00000401, RoleContributor = 0x00000402, RoleNoneditingAuthor = 0x00000413, RoleAuthor = 0x0000041B, RoleEditor = 0x0000047B, RolePublishAuthor = 0x0000049B, RolePublishEditor = 0x000004FB, RightsAll = 0x000005FB, RoleOwner = 0x000007FB } ACLRIGHTS; typedef [public, enum8bit, flag(NDR_PAHEX)] enum { op_MAPI_Release = 0x1, op_MAPI_OpenFolder = 0x2, op_MAPI_OpenMessage = 0x3, op_MAPI_GetHierarchyTable = 0x4, op_MAPI_GetContentsTable = 0x5, op_MAPI_CreateMessage = 0x6, op_MAPI_GetProps = 0x7, op_MAPI_GetPropsAll = 0x8, op_MAPI_GetPropList = 0x9, op_MAPI_SetProps = 0xa, op_MAPI_DeleteProps = 0xb, op_MAPI_SaveChangesMessage = 0xc, op_MAPI_RemoveAllRecipients = 0xd, op_MAPI_ModifyRecipients = 0xe, op_MAPI_ReadRecipients = 0xf, op_MAPI_SetMessageReadFlag = 0x11, op_MAPI_SetColumns = 0x12, op_MAPI_SortTable = 0x13, op_MAPI_Restrict = 0x14, op_MAPI_QueryRows = 0x15, op_MAPI_GetStatus = 0x16, op_MAPI_GetRowCount = 0x17, op_MAPI_SeekRow = 0x18, op_MAPI_SeekRowBookmark = 0x19, op_MAPI_SeekRowApprox = 0x1a, op_MAPI_CreateBookmark = 0x1b, op_MAPI_CreateFolder = 0x1c, op_MAPI_DeleteFolder = 0x1d, op_MAPI_DeleteMessages = 0x1e, op_MAPI_GetMessageStatus = 0x1f, op_MAPI_SetMessageStatus = 0x20, op_MAPI_GetAttachmentTable = 0x21, op_MAPI_OpenAttach = 0x22, op_MAPI_CreateAttach = 0x23, op_MAPI_DeleteAttach = 0x24, op_MAPI_SaveChanges = 0x25, op_MAPI_SetReceiveFolder = 0x26, op_MAPI_GetReceiveFolder = 0x27, op_MAPI_Advise = 0x29, op_MAPI_Notify = 0x2a, op_MAPI_OpenStream = 0x2b, op_MAPI_ReadStream = 0x2c, op_MAPI_WriteStream = 0x2d, op_MAPI_SeekStream = 0x2e, op_MAPI_SetStreamSize = 0x2f, op_MAPI_SetSearchCriteria = 0x30, op_MAPI_GetSearchCriteria = 0x31, op_MAPI_SubmitMessage = 0x32, op_MAPI_MoveCopyMessages = 0x33, op_MAPI_AbortSubmit = 0x34, op_MAPI_MoveFolder = 0x35, op_MAPI_CopyFolder = 0x36, op_MAPI_QueryColumnsAll = 0x37, op_MAPI_Abort = 0x38, op_MAPI_CopyToStream = 0x3a, op_MAPI_GetTable = 0x3e, op_MAPI_GetRulesTable = 0x3f, op_MAPI_ModifyTable = 0x40, op_MAPI_SetSpooler = 0x47, op_MAPI_SpoolerLockMessage = 0x48, op_MAPI_AddressTypes = 0x49, op_MAPI_TransportSend = 0x4a, op_MAPI_FindRow = 0x4f, op_MAPI_GetNamesFromIDs = 0x55, op_MAPI_GetIDsFromNames = 0x56, op_MAPI_EmptyFolder = 0x58, op_MAPI_ExpandRow = 0x59, op_MAPI_CollapseRow = 0x5a, op_MAPI_CommitStream = 0x5d, op_MAPI_GetStreamSize = 0x5e, op_MAPI_QueryNamesFromIDs = 0x5f, op_MAPI_SetReadFlags = 0x66, op_MAPI_CopyProperties = 0x67, op_MAPI_GetReceiveFolderTable = 0x68, op_MAPI_GetCollapseState = 0x6b, op_MAPI_SetCollapseState = 0x6c, op_MAPI_GetTransportFolder = 0x6d, op_MAPI_ResetTable = 0x81, op_MAPI_GetLocalReplicaIds = 0x7f, op_MAPI_OpenPublicFolderByName = 0x87, op_MAPI_FreeBookmark = 0x89, op_MAPI_Logon = 0xfe } MAPI_OPNUM; typedef [public,noprint,flag(NDR_NOALIGN)] struct { uint16 cb; [flag(NDR_BUFFERS)]uint8 lpb[cb]; } SBinary_short; typedef struct { uint32 cValues; uint32 lpl[cValues]; } mapi_MV_LONG_STRUCT; typedef struct { astring lppszA; } mapi_LPSTR; typedef struct { uint32 cValues; mapi_LPSTR strings[cValues]; } mapi_SLPSTRArray; typedef struct { uint32 cValues; SBinary_short bin[cValues]; } mapi_SBinaryArray; typedef struct { uint32 cValues; GUID lpguid[cValues]; } mapi_SGuidArray; typedef [public,nodiscriminant,flag(NDR_NOALIGN)] union { [case(PT_I2)] uint16 i; [case(PT_LONG)] uint32 l; [case(PT_DOUBLE)] dlong dbl; [case(PT_ERROR)] uint32 err; [case(PT_BOOLEAN)] uint8 b; [case(PT_I8)] dlong d; [case(PT_STRING8)] astring lpszA; [case(PT_UNICODE)][flag(STR_NULLTERM)] string lpszW; [case(PT_SYSTIME)] FILETIME ft; [case(PT_CLSID)] GUID lpguid; [case(PT_BINARY)] SBinary_short bin; [case(PT_SVREID)] SBinary_short bin; [case(PT_MV_LONG)] mapi_MV_LONG_STRUCT MVl; [case(PT_MV_STRING8)] mapi_SLPSTRArray MVszA; [case(PT_MV_CLSID)] mapi_SGuidArray MVguid; [case(PT_MV_BINARY)] mapi_SBinaryArray MVbin; } mapi_SPropValue_CTR; typedef [public,flag(NDR_NOALIGN)] struct { MAPITAGS ulPropTag; [switch_is(ulPropTag & 0xFFFF)] mapi_SPropValue_CTR value; } mapi_SPropValue; typedef [flag(NDR_NOALIGN)] struct { uint16 cValues; [flag(NDR_REMAINING)]mapi_SPropValue lpProps[cValues]; } mapi_SPropValue_array; typedef [flag(NDR_NOALIGN)] struct { uint16 cValues; MAPITAGS aulPropTag[cValues]; } mapi_SPropTagArray; typedef [enum8bit, flag(NDR_PAHEX)] enum { ROW_ADD = 0x1, ROW_MODIFY = 0x2, ROW_REMOVE = 0x4 } ulRowFlags; typedef [flag(NDR_NOALIGN)] struct { ulRowFlags ulRowFlags; mapi_SPropValue_array lpProps; } mapi_SRow; typedef [flag(NDR_NOALIGN)] struct { uint8 padding; uint16 cEntries; mapi_SRow aEntries[cEntries]; } mapi_SRowList; /**************************/ /* EcDoRpc Function 0x1 */ typedef [nopush,nopull,flag(NDR_NOALIGN)] struct { } Release_req; typedef [nopush,nopull,flag(NDR_NOALIGN)] struct { } Release_repl; /**************************/ /* EcDoRpc Function 0x2 */ typedef [enum8bit] enum { OpenModeFlags_Folder = 0x0, OpenModeFlags_SoftDeleted = 0x4 } OpenModeFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; hyper folder_id; OpenModeFlags OpenModeFlags; } OpenFolder_req; typedef [flag(NDR_NOALIGN)] struct { uint16 unknown; } OpenFolder_repl; /**************************/ /* EcDoRpc Function 0x3 */ typedef [flag(NDR_NOALIGN)] struct { uint8 folder_handle_idx; uint16 max_data; hyper folder_id; uint8 message_permissions; hyper message_id; } OpenMessage_req; typedef [v1_enum, flag(NDR_PAHEX)] enum { CP_USASCII = 0x04E4, CP_UNICODE = 0x04B0, CP_JAUTODETECT = 0xC6F4, CP_KAUTODETECT = 0xC705, CP_ISO2022JPESC = 0xC42D, CP_ISO2022JPSIO = 0xC42E } CODEPAGEID; typedef [enum8bit, flag(NDR_PAHEX)] enum { MAPI_ORIG = 0x0, MAPI_TO = 0x1, MAPI_CC = 0x2, MAPI_BCC = 0x3 } ulRecipClass; typedef [enum8bit, flag(NDR_PAHEX)] enum { SINGLE_RECIPIENT = 0x0, DISTRIBUTION_LIST = 0x1 } addr_type; typedef [flag(NDR_NOALIGN)]struct { uint8 organization_length; addr_type addr_type; astring username; } RecipExchange; typedef [flag(NDR_NOALIGN)] struct { } RecipSMTP; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)] RecipExchange EXCHANGE; [case(0xA)] RecipSMTP SMTP; [default]; } recipient_type; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)]; [case(0x400)] astring lpszA; [case(0x600)][flag(STR_NULLTERM)] string lpszW; [default]; } recipient_SimpleDisplayName; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)]; [case(0x20)] astring lpszA; [case(0x220)][flag(STR_NULLTERM)] string lpszW; [default]; } recipient_TransmittableDisplayName; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)]; [case(0x10)] astring lpszA; [case(0x210)][flag(STR_NULLTERM)] string lpszW; [default]; } recipient_DisplayName; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)]; [case(0x8)] astring lpszA; [case(0x208)][flag(STR_NULLTERM)] string lpszW; [default]; } recipient_EmailAddress; typedef [flag(NDR_NOALIGN)] struct { uint16 RecipientFlags; [switch_is(RecipientFlags & 0xA)] recipient_type type; [switch_is(RecipientFlags & 0x600)] recipient_SimpleDisplayName SimpleDisplayName; [switch_is(RecipientFlags & 0x220)] recipient_TransmittableDisplayName TransmittableDisplayName; [switch_is(RecipientFlags & 0x210)] recipient_DisplayName DisplayName; [switch_is(RecipientFlags & 0x208)] recipient_EmailAddress EmailAddress; uint16 prop_count; uint8 layout; [flag(NDR_REMAINING)] DATA_BLOB prop_values; } RecipientRow; typedef [flag(NDR_NOALIGN)] struct { ulRecipClass RecipClass; CODEPAGEID codepage; [subcontext(2)] RecipientRow RecipientRow; } OpenMessage_recipients; typedef [public, nodiscriminant]union { [case(0x0)]; [case(0x1)]; [case(0x3)] astring subject; } OpenMessage_repl_UNION; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; uint8 type_prefix; [switch_is(type_prefix)] OpenMessage_repl_UNION prefix; uint8 type_subject; [switch_is(type_subject)] OpenMessage_repl_UNION subject; uint16 recipient_count; mapi_SPropTagArray SPropTagArray; uint8 recipient_count_again; OpenMessage_recipients recipients[recipient_count]; } OpenMessage_repl; /**************************/ /* EcDoRpc Function 0x4 */ typedef [bitmap8bit] bitmap { TableFlags_Depth = 0x4, TableFlags_DeferredErrors = 0x8, TableFlags_NoNotifications = 0x10, TableFlags_SoftDeletes = 0x20, TableFlags_UseUnicode = 0x40, TableFlags_SuppressNotifications = 0x80 } TableFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; TableFlags TableFlags; } GetHierarchyTable_req; typedef [flag(NDR_NOALIGN)] struct { uint32 RowCount; } GetHierarchyTable_repl; /**************************/ /* EcDoRpc Function 0x5 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; TableFlags TableFlags; } GetContentsTable_req; typedef [flag(NDR_NOALIGN)] struct { uint32 RowCount; } GetContentsTable_repl; /**************************/ /* EcDoRpc Function 0x6 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint16 max_data; hyper folder_id; uint8 padding; } CreateMessage_req; typedef [flag(NDR_NOALIGN)] struct { uint8 padding; } CreateMessage_repl; /*************************/ /* EcDoRpc Function 0x7 */ typedef [flag(NDR_NOALIGN)] struct { uint32 unknown; uint16 prop_count; MAPITAGS properties[prop_count]; } GetProps_req; typedef [flag(NDR_NOALIGN)] struct { uint8 layout; [flag(NDR_REMAINING)] DATA_BLOB prop_data; } GetProps_repl; /*************************/ /* EcDoRpc Function 0x8 */ typedef [flag(NDR_NOALIGN)] struct { uint16 dwAlignPad; uint16 unknown; } GetPropsAll_req; typedef [flag(NDR_NOALIGN)] struct { mapi_SPropValue_array properties; } GetPropsAll_repl; /*************************/ /* EcDoRpc Function 0x9 */ typedef [flag(NDR_NOALIGN)] struct { } GetPropList_req; typedef [flag(NDR_NOALIGN)] struct { uint16 count; MAPITAGS tags[count]; } GetPropList_repl; /*************************/ /* EcDoRpc Function 0xa */ typedef [flag(NDR_NOALIGN)] struct { [subcontext(2)] mapi_SPropValue_array values; } SetProps_req; typedef [flag(NDR_NOALIGN)] struct { uint16 unknown; } SetProps_repl; /*************************/ /* EcDoRpc Function 0xb */ typedef [flag(NDR_NOALIGN)] struct { uint16 count; MAPITAGS tags[count]; } DeleteProps_req; typedef [flag(NDR_NOALIGN)] struct { uint16 unknown; } DeleteProps_repl; /*************************/ /* EcDoRpc Function 0xc */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint8 prop_nb; } SaveChangesMessage_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; hyper message_id; } SaveChangesMessage_repl; /*************************/ /* EcDoRpc Function 0xd */ typedef [flag(NDR_NOALIGN)] struct { uint32 ulReserved; } RemoveAllRecipients_req; typedef [flag(NDR_NOALIGN)] struct { } RemoveAllRecipients_repl; /*************************/ /* EcDoRpc Function 0xe */ /* * MODRECIP_NULL and INVALID are not part of the msdn flags * but are added for printing support */ typedef [enum8bit,flag(NDR_PAHEX)] enum { MODRECIP_NULL = 0x0, MODRECIP_INVALID = 0x1, MODRECIP_ADD = 0x2, MODRECIP_MODIFY = 0x4, MODRECIP_REMOVE = 0x8 } modrecip; typedef [flag(NDR_NOALIGN)]struct { uint32 idx; ulRecipClass RecipClass; [subcontext(2),flag(NDR_REMAINING)] RecipientRow RecipientRow; } ModifyRecipientRow; typedef [flag(NDR_NOALIGN)] struct { uint16 prop_count; MAPITAGS properties[prop_count]; uint16 cValues; ModifyRecipientRow RecipientRow[cValues]; } ModifyRecipients_req; typedef [flag(NDR_NOALIGN)] struct { } ModifyRecipients_repl; /*************************/ /* EcDoRpc Function 0xf */ typedef [flag(NDR_NOALIGN)] struct { uint32 RowId; uint16 ulReserved; } ReadRecipients_req; typedef [flag(NDR_NOALIGN)] struct { uint32 RowId; ulRecipClass RecipientType; uint16 CodePageId; uint16 ulReserved; [subcontext(2)] RecipientRow RecipientRow; } ReadRecipientRow; typedef [flag(NDR_NOALIGN)] struct { uint8 RowCount; ReadRecipientRow RecipientRows[RowCount]; } ReadRecipients_repl; /*************************/ /* EcDoRpc Function 0x11 */ typedef [bitmap8bit] bitmap { SUPPRESS_RECEIPT = 0x01, CLEAR_READ_FLAG = 0x04, MAPI_DEFERRED_ERRORS = 0x08, GENERATE_RECEIPT_ONLY = 0x10, CLEAR_RN_PENDING = 0x20, CLEAR_NRN_PENDING = 0x40 } MSGFLAG_READ; /* TODO: there is a variation that can provide "client data" here */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; MSGFLAG_READ flags; } SetMessageReadFlag_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; } SetMessageReadFlag_repl; /*************************/ /* EcDoRpc Function 0x12 */ typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; uint16 prop_count; MAPITAGS properties[prop_count]; } SetColumns_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; } SetColumns_repl; /**************************/ /* EcDoRpc Function 0x13 */ typedef [enum8bit, flag(NDR_PAHEX)] enum { TBL_ASYNC = 0x1, TBL_BATCH = 0x2 } TBL_FLAGS; typedef [enum8bit, flag(NDR_PAHEX)] enum { TABLE_SORT_ASCEND = 0x0, TABLE_SORT_COMBINE = 0x1, TABLE_SORT_DESCEND = 0x2 } TABLE_SORT; typedef [public, flag(NDR_NOALIGN)] struct _SSortOrder{ MAPITAGS ulPropTag; TABLE_SORT ulOrder; } SSortOrder; typedef [public, flag(NDR_NOALIGN)] struct _SSortOrderSet { uint16 cSorts; uint16 cCategories; uint16 cExpanded; SSortOrder aSort[cSorts]; } SSortOrderSet; typedef [flag(NDR_NOALIGN)]struct { uint8 SortTableFlags; SSortOrderSet lpSortCriteria; } SortTable_req; typedef [enum8bit] enum { TBLSTAT_COMPLETE = 0x0, TBLSTAT_SORTING = 0x9, TBLSTAT_SORT_ERROR = 0xA, TBLSTAT_SETTING_COLS = 0xB, TBLSTAT_SETCOL_ERROR = 0xD, TBLSTAT_RESTRICTING = 0xE, TBLSTAT_RESTRICT_ERROR = 0xF } TableStatus; typedef [flag(NDR_NOALIGN)] struct { TableStatus TableStatus; } SortTable_repl; /**************************/ /* EcDoRpc Function 0x14 */ typedef [flag(NDR_NOALIGN)] struct { uint16 cRes; mapi_SRestriction_and res[cRes]; } mapi_SAndRestriction; typedef [flag(NDR_NOALIGN)] struct { uint16 cRes; mapi_SRestriction_or res[cRes]; } mapi_SOrRestriction; typedef [nopull,nopush,noprint,flag(NDR_NOALIGN)] struct { mapi_SRestriction_not *res; } mapi_SNotRestriction; typedef [noprint, bitmap32bit] bitmap { FL_FULLSTRING = 0x00000, FL_SUBSTRING = 0x00001, FL_PREFIX = 0x00002, FL_IGNORECASE = 0x10000, FL_IGNORENONSPACE = 0x20000, FL_LOOSE = 0x40000 } fuzzyLevel; typedef [flag(NDR_NOALIGN)] struct { fuzzyLevel fuzzy; MAPITAGS ulPropTag; mapi_SPropValue lpProp; } mapi_SContentRestriction; typedef [enum8bit, flag(NDR_PAHEX)] enum { BMR_EQZ = 0x0, BMR_NEZ = 0x1 } relMBR; typedef [flag(NDR_NOALIGN)] struct { relMBR relMBR; MAPITAGS ulPropTag; uint32 ulMask; } mapi_SBitmaskRestriction; typedef [enum8bit, flag(NDR_PAHEX)] enum { RELOP_LT = 0x0, /* < */ RELOP_LE = 0x1, /* <= */ RELOP_GT = 0x2, /* > */ RELOP_GE = 0x3, /* >= */ RELOP_EQ = 0x4, /* == */ RELOP_NE = 0x5, /* != */ RELOP_RE = 0x6 /* LIKE (Regular expression) */ } CompareRelop; typedef [flag(NDR_NOALIGN)] struct { CompareRelop relop; MAPITAGS ulPropTag; uint32 size; } mapi_SSizeRestriction; typedef [flag(NDR_NOALIGN)] struct { uint8 relop; MAPITAGS ulPropTag; mapi_SPropValue lpProp; } mapi_SPropertyRestriction; typedef [flag(NDR_NOALIGN)] struct { CompareRelop relop; MAPITAGS ulPropTag1; MAPITAGS ulPropTag2; } mapi_SCompareProps; typedef [flag(NDR_NOALIGN)] struct { MAPITAGS ulPropTag; } mapi_SExistRestriction; typedef [flag(NDR_NOALIGN)] struct { MAPITAGS ulSubObject; mapi_SRestriction_sub res[ulSubObject - ulSubObject + 1]; /* nasty hack - generates fake pointer */ } mapi_SSubRestriction; typedef [flag(NDR_NOALIGN)] struct { uint8 cValues; uint16 cRes; uint16 unknown; mapi_SRestriction_comment res[cRes]; mapi_SPropValue lpProp[cValues]; } mapi_SCommentRestriction; typedef [nodiscriminant] union { [case(RES_AND)] mapi_SAndRestriction resAnd; [case(RES_OR)] mapi_SOrRestriction resOr; [case(RES_NOT)] mapi_SNotRestriction resNot; [case(RES_CONTENT)] mapi_SContentRestriction resContent; [case(RES_PROPERTY)] mapi_SPropertyRestriction resProperty; [case(RES_COMPAREPROPS)] mapi_SCompareProps resCompareProps; [case(RES_BITMASK)] mapi_SBitmaskRestriction resBitmask; [case(RES_SIZE)] mapi_SSizeRestriction resSize; [case(RES_EXIST)] mapi_SExistRestriction resExist; [case(RES_SUBRESTRICTION)] mapi_SSubRestriction resSub; [case(RES_COMMENT)] mapi_SCommentRestriction resComment; } mapi_SRestriction_CTR; typedef [flag(NDR_NOALIGN)] struct { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction; typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction_and; typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction_or; typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction_not; typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction_sub; typedef [public,flag(NDR_NOALIGN)] struct _mapi_SRestriction { uint8 rt; [switch_is(rt)] mapi_SRestriction_CTR res; } mapi_SRestriction_comment; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; [subcontext(2)] mapi_SRestriction restrictions; } Restrict_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; } Restrict_repl; /**************************/ /* EcDoRpc Function 0x15 */ typedef [enum8bit] enum { TBL_ADVANCE = 0x0, TBL_NOADVANCE = 0x1, TBL_ENABLEPACKEDBUFFERS = 0x2 } QueryRowsFlags; typedef [flag(NDR_NOALIGN)] struct { QueryRowsFlags QueryRowsFlags; uint8 ForwardRead; uint16 RowCount; } QueryRows_req; typedef [nopull,flag(NDR_NOALIGN)] struct { uint8 Origin; uint16 RowCount; [flag(NDR_REMAINING)]DATA_BLOB RowData; } QueryRows_repl; /**************************/ /* EcDoRpc Function 0x16 */ typedef [flag(NDR_NOALIGN)] struct { } GetStatus_req; typedef [flag(NDR_NOALIGN)] struct { TableStatus TableStatus; } GetStatus_repl; /**************************/ /* EcDoRpc Function 0x17 */ typedef [flag(NDR_NOALIGN)] struct { } GetRowCount_req; typedef [flag(NDR_NOALIGN)] struct { uint32 unknown; uint32 count; } GetRowCount_repl; /**************************/ /* EcDoRpc Function 0x18 */ typedef [enum8bit] enum { BOOKMARK_BEGINNING = 0x0, BOOKMARK_CURRENT = 0x1, BOOKMARK_END = 0x2, BOOKMARK_USER = 0x3 } BOOKMARK; typedef [flag(NDR_NOALIGN)] struct { BOOKMARK origin; int32 offset; uint8 unknown_1; } SeekRow_req; typedef [flag(NDR_NOALIGN)] struct { uint32 row; uint8 unknown; } SeekRow_repl; /**************************/ /* EcDoRpc Function 0x19 */ typedef [flag(NDR_NOALIGN)] struct { SBinary_short bookmark; uint32 offset; uint8 unknown; } SeekRowBookmark_req; typedef [flag(NDR_NOALIGN)] struct { uint16 unknown; uint32 row; } SeekRowBookmark_repl; /**************************/ /* EcDoRpc Function 0x1a */ typedef [flag(NDR_NOALIGN)] struct { uint32 ulNumerator; uint32 ulDenominator; } SeekRowApprox_req; typedef [flag(NDR_NOALIGN)] struct { } SeekRowApprox_repl; /**************************/ /* EcDoRpc Function 0x1b */ typedef [flag(NDR_NOALIGN)] struct { } CreateBookmark_req; typedef [flag(NDR_NOALIGN)] struct { SBinary_short bookmark; } CreateBookmark_repl; /**************************/ /* EcDoRpc Function 0x1c */ typedef [enum8bit] enum { FOLDER_GENERIC = 0x1, FOLDER_SEARCH = 0x2 } FOLDER_TYPE; typedef [enum8bit] enum { MAPI_FOLDER_ANSI = 0x0, MAPI_FOLDER_UNICODE = 0x1 } FOLDER_STRING; typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(MAPI_FOLDER_ANSI)] astring lpszA; [case(MAPI_FOLDER_UNICODE)][flag(STR_NULLTERM)] string lpszW; } LPTSTR; typedef [enum16bit] enum { NONE = 0x0000, OPEN_IF_EXISTS = 0x0001 } FOLDER_FLAGS; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; FOLDER_TYPE ulFolderType; FOLDER_STRING ulType; FOLDER_FLAGS ulFlags; [switch_is(ulType)] LPTSTR FolderName; [switch_is(ulType)] LPTSTR FolderComment; } CreateFolder_req; typedef [flag(NDR_NOALIGN)] struct { hyper folder_id; uint8 unknown; } CreateFolder_repl; /**************************/ /* EcDoRpc Function 0x1d */ typedef [flag(NDR_NOALIGN)] struct { uint8 flags; hyper folder_id; } DeleteFolder_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; } DeleteFolder_repl; /**************************/ /* EcDoRpc Function 0x1e */ typedef [flag(NDR_NOALIGN)] struct { boolean8 WantAsynchronous; boolean8 NotifyNonRead; uint16 cn_ids; hyper message_ids[cn_ids]; } DeleteMessages_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 PartialCompletion; } DeleteMessages_repl; /**************************/ /* EcDoRpc Function 0x1f */ typedef [flag(NDR_NOALIGN)] struct { hyper msgid; } GetMessageStatus_req; /**************************/ /* EcDoRpc Function 0x20 */ typedef [bitmap32bit] bitmap { MSGSTATUS_HIGHLIGHTED = 0x1, MSGSTATUS_TAGGED = 0x2, MSGSTATUS_HIDDEN = 0x4, MSGSTATUS_DELMARKED = 0x8, MSGSTATUS_REMOTE_DOWNLOAD = 0x1000, MSGSTATUS_REMOTE_DELETE = 0x2000 } ulMessageStatus; typedef [flag(NDR_NOALIGN)] struct { hyper msgid; uint32 ulNewStatus; ulMessageStatus ulNewStatusMask; } SetMessageStatus_req; typedef [flag(NDR_NOALIGN)] struct { ulMessageStatus ulOldStatus; } SetMessageStatus_repl; /**************************/ /* EcDoRpc Function 0x21 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint8 unknown; } GetAttachmentTable_req; typedef [flag(NDR_NOALIGN)] struct { } GetAttachmentTable_repl; /*************************/ /* EcDoRpc Function 0x22 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint8 unknown; uint32 num_attach; } OpenAttach_req; typedef [flag(NDR_NOALIGN)] struct { } OpenAttach_repl; /*************************/ /* EcDoRpc Function 0x23 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; } CreateAttach_req; typedef [flag(NDR_NOALIGN)] struct { uint32 unknown; } CreateAttach_repl; /*************************/ /* EcDoRpc Function 0x24 */ typedef [flag(NDR_NOALIGN)] struct { uint32 num_attach; } DeleteAttach_req; typedef [flag(NDR_NOALIGN)] struct { } DeleteAttach_repl; /*************************/ /* EcDoRpc Function 0x25 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint8 ulFlags; } SaveChanges_req; typedef [flag(NDR_NOALIGN)] struct { } SaveChanges_repl; /*************************/ /* EcDoRpc Function 0x26 */ typedef [flag(NDR_NOALIGN)] struct { hyper fid; astring lpszMessageClass; } SetReceiveFolder_req; typedef [flag(NDR_NOALIGN)] struct { } SetReceiveFolder_repl; /*************************/ /* EcDoRpc Function 0x27 */ typedef [flag(NDR_NOALIGN)] struct { astring MessageClass; } GetReceiveFolder_req; typedef [flag(NDR_NOALIGN)] struct { hyper folder_id; } GetReceiveFolder_repl; /*************************/ /* EcDoRpc Function 0x29 */ typedef [bitmap16bit] bitmap { fnevCriticalError = 0x00000001, fnevNewMail = 0x00000002, fnevObjectCreated = 0x00000004, fnevObjectDeleted = 0x00000008, fnevObjectModified = 0x00000010, fnevObjectMoved = 0x00000020, fnevObjectCopied = 0x00000040, fnevSearchComplete = 0x00000080, fnevTableModified = 0x00000100, fnevStatusObjectModified= 0x00000200, fnevReservedForMapi = 0x40000000, fnevExtended = 0x80000000 } ulEventType; typedef struct { hyper entryid[2]; } notif_entryid; typedef [nodiscriminant] union { [case (0x0)] notif_entryid entryids; [case (0x1)]; } notification_data; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; ulEventType notification_type; uint8 layout; [switch_is(layout)] notification_data u; } Advise_req; typedef [flag(NDR_NOALIGN)] struct { } Advise_repl; /*************************/ /* EcDoRpc Function 0x2a */ /******************** EXPERIMENTAL *********************/ typedef [bitmap32bit] bitmap { MSGFLAG_READ = 0x1, MSGFLAG_UNMODIFIED = 0x2, MSGFLAG_SUBMIT = 0x4, MSGFLAG_UNSENT = 0x8, MSGFLAG_HASATTACH = 0x10, MSGFLAG_FROMME = 0x20, MSGFLAG_ASSOCIATED = 0x40, MSGFLAG_RESEND = 0x80, MSGFLAG_RN_PENDING = 0x100, MSGFLAG_NRN_PENDING = 0x200 } MsgFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 type; hyper lpParentID; hyper lpEntryID; MsgFlags MsgFlags; uint8 unknown; astring lpszMessageClass; uint8 unknown2[3]; } NEWMAIL_NOTIFICATION; typedef [flag(NDR_NOALIGN)] struct { mapi_SPropTagArray lpPropTagArray; uint32 msg_count;//fixme uint8 unknown[3]; } obj_change; typedef [flag(NDR_NOALIGN)] struct { mapi_SPropValue_array properties; uint8 unknown[3]; } obj_update; typedef [flag(NDR_NOALIGN)] struct { mapi_SPropTagArray lpPropTagArray; uint32 row_idx; uint32 unread_count; } obj_received; typedef [flag(NDR_NOALIGN)] struct { hyper lpEntryID; mapi_SPropTagArray lpPropTagArray; } obj_created; typedef [flag(NDR_NOALIGN),nodiscriminant] union { [case(0x0)] obj_change change; [case(0x10)] obj_change change; [case(0x20)] obj_update update; [case(0x30)] obj_received received; [case(0x80)] obj_created created; [default] [flag(NDR_REMAINING)]DATA_BLOB blob; } OBJECT_TYPE; typedef [flag(NDR_NOALIGN)] struct { uint8 type; hyper lpParentID; [switch_is(type)]OBJECT_TYPE object_type; } OBJECT_NOTIFICATION; typedef [nodiscriminant] union { [case(fnevNewMail)] NEWMAIL_NOTIFICATION newmail; [case(fnevObjectCreated)] OBJECT_NOTIFICATION obj; [default][flag(NDR_REMAINING)] DATA_BLOB data; } NOTIFICATION; /******************** EXPERIMENTAL *********************/ typedef [flag(NDR_NOALIGN)] struct { uint8 unknown[5]; uint8 ulEventType; [switch_is(ulEventType)]NOTIFICATION info; } Notify_repl; /*************************/ /* EcDoRpc Function 0x2b */ typedef [flag(NDR_NOALIGN)] struct { uint8 stream_handle_idx; MAPITAGS prop; uint8 access_flags; } OpenStream_req; typedef [flag(NDR_NOALIGN)] struct { uint32 length; } OpenStream_repl; /*************************/ /* EcDoRpc Function 0x2c */ typedef [flag(NDR_NOALIGN)] struct { uint16 size; } ReadStream_req; typedef [flag(NDR_ALIGN2)] struct { [subcontext(2), flag(NDR_REMAINING)] DATA_BLOB data; } ReadStream_repl; /*************************/ /* EcDoRpc Function 0x2d */ typedef [flag(NDR_NOALIGN)] struct { [subcontext(2), flag(NDR_REMAINING)] DATA_BLOB data; } WriteStream_req; typedef [flag(NDR_NOALIGN)] struct { uint16 size; } WriteStream_repl; /*************************/ /* EcDoRpc Function 0x2e */ typedef [flag(NDR_NOALIGN)] struct { uint8 Origin; hyper Offset; } SeekStream_req; typedef [flag(NDR_NOALIGN)] struct { hyper NewPosition; } SeekStream_repl; /*************************/ /* EcDoRpc Function 0x2f */ typedef [flag(NDR_NOALIGN)] struct { hyper SizeStream; } SetStreamSize_req; typedef [flag(NDR_NOALIGN)] struct { } SetStreamSize_repl; /*************************/ /* EcDoRpc Function 0x30 */ typedef [bitmap32bit, flag(NDR_PAHEX)] bitmap { STOP_SEARCH = 0x1, RESTART_SEARCH = 0x2, RECURSIVE_SEARCH = 0x4, SHALLOW_SEARCH = 0x8, FOREGROUND_SEARCH = 0x10, BACKGROUND_SEARCH = 0x20 } ulSearchFlags; typedef [flag(NDR_NOALIGN)] struct { [subcontext(2)] mapi_SRestriction res; uint16 count; hyper lpContainerList[count]; ulSearchFlags ulSearchFlags; } SetSearchCriteria_req; typedef [flag(NDR_NOALIGN)] struct { } SetSearchCriteria_repl; /*************************/ /* EcDoRpc Function 0x31 */ typedef [flag(NDR_NOALIGN)] struct { boolean8 UseUnicode; boolean8 IncludeRestriction; boolean8 IncludeFolders; } GetSearchCriteria_req; typedef [flag(NDR_NOALIGN)] struct { [subcontext(2)] mapi_SRestriction res; uint8 unknown; uint16 count; hyper lpContainerList[count]; ulSearchFlags ulSearchFlags; } GetSearchCriteria_repl; /*************************/ /* EcDoRpc Function 0x32 */ typedef [enum8bit] enum { None = 0x0, /* None */ PreProcess = 0x1, /* Needs to be preprocessed by the server */ NeedsSpooler = 0x2 /* Is to be processed by a client spooler */ } SubmitFlags; typedef [flag(NDR_NOALIGN)] struct { SubmitFlags SubmitFlags; } SubmitMessage_req; typedef [flag(NDR_NOALIGN)] struct { } SubmitMessage_repl; /*************************/ /* EcDoRpc Function 0x33 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint16 count; hyper message_id[count]; boolean8 WantAsynchronous; boolean8 WantCopy; } MoveCopyMessages_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 PartialCompletion; } MoveCopyMessages_repl; /*************************/ /* EcDoRpc Function 0x34 */ typedef [flag(NDR_NOALIGN)] struct { hyper FolderId; hyper MessageId; } AbortSubmit_req; typedef [flag(NDR_NOALIGN)] struct { } AbortSubmit_repl; /*************************/ /* EcDoRpc Function 0x35 */ typedef [nodiscriminant, flag(NDR_NOALIGN)] union { [case(0x0)] astring lpszA; [case(0x1)][flag(STR_NULLTERM)] string lpszW; } Folder_name; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; boolean8 WantAsynchronous; boolean8 UseUnicode; hyper FolderId; [switch_is(UseUnicode)] Folder_name NewFolderName; } MoveFolder_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 PartialCompletion; } MoveFolder_repl; /*************************/ /* EcDoRpc Function 0x36 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; boolean8 WantAsynchronous; boolean8 WantRecursive; boolean8 UseUnicode; hyper FolderId; [switch_is(UseUnicode)] Folder_name NewFolderName; } CopyFolder_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 PartialCompletion; } CopyFolder_repl; /*************************/ /* EcDoRpc Function 0x37 */ typedef [flag(NDR_NOALIGN)] struct { } QueryColumnsAll_req; typedef [flag(NDR_NOALIGN)] struct { uint16 PropertyTagCount; MAPITAGS PropertyTags[PropertyTagCount]; } QueryColumnsAll_repl; /*************************/ /* EcDoRpc Function 0x38 */ typedef [flag(NDR_NOALIGN)] struct { } Abort_req; typedef [flag(NDR_NOALIGN)] struct { TableStatus TableStatus; } Abort_repl; /*************************/ /* EcDoRpc Function 0x3a */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; hyper ByteCount; } CopyToStream_req; typedef [flag(NDR_NOALIGN)] struct { hyper ReadByteCount; hyper WrittenByteCount; } CopyToStream_repl; /*************************/ /* EcDoRpc Function 0x3e */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; uint8 padding; } GetTable_req; typedef [flag(NDR_NOALIGN)] struct { } GetTable_repl; /*************************/ /* EcDoRpc Function 0x3f */ typedef [bitmap8bit] bitmap { RulesTableFlags_Unicode = 0x40 } RulesTableFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; RulesTableFlags TableFlags; } GetRulesTable_req; typedef [flag(NDR_NOALIGN)] struct { } GetRulesTable_repl; /*************************/ /* EcDoRpc Function 0x40 */ typedef [flag(NDR_NOALIGN)] struct { mapi_SRowList rowList; } ModifyTable_req; typedef [flag(NDR_NOALIGN)] struct { [flag(NDR_REMAINING)] DATA_BLOB remaining; } ModifyTable_repl; /*************************/ /* EcDoRpc Function 0x47 */ typedef [flag(NDR_NOALIGN)] struct { } SetSpooler_req; typedef [flag(NDR_NOALIGN)] struct { } SetSpooler_repl; /*************************/ /* EcDoRpc Function 0x48 */ typedef [enum8bit] enum { LockState_1stLock = 0x0, LockState_1stUnlock = 0x1, LockState_1stFinished = 0x2 } LockState; typedef [flag(NDR_NOALIGN)] struct { hyper MessageId; LockState LockState; } SpoolerLockMessage_req; typedef [flag(NDR_NOALIGN)] struct { } SpoolerLockMessage_repl; /*************************/ /* EcDoRpc Function 0x49 */ typedef [flag(NDR_NOALIGN)] struct { } AddressTypes_req; typedef [flag(NDR_NOALIGN)] struct { uint16 cValues; uint16 size; mapi_LPSTR transport[cValues]; } AddressTypes_repl; /**************************/ /* EcDoRpc Function 0x4a */ typedef [flag(NDR_NOALIGN)] struct { } TransportSend_req; typedef [nodiscriminant] union { [case(0x0)] mapi_SPropValue_array lpProps; [case(0x1)]; } TransportSend_lpProps; typedef [flag(NDR_NOALIGN)] struct { boolean8 NoPropertiesReturned; [switch_is(NoPropertiesReturned)] TransportSend_lpProps properties; } TransportSend_repl; /**************************/ /* EcDoRpc Function 0x4f */ typedef [enum8bit] enum { DIR_FORWARD = 0x0, DIR_BACKWARD = 0x1 } FindRow_ulFlags; typedef [flag(NDR_NOALIGN)] struct { FindRow_ulFlags ulFlags; [subcontext(2)] mapi_SRestriction res; BOOKMARK origin; SBinary_short bookmark; } FindRow_req; typedef [flag(NDR_NOALIGN)] struct { uint8 RowNoLongerVisible; uint8 HasRowData; [flag(NDR_NOALIGN)] DATA_BLOB row; } FindRow_repl; /*************************/ /* EcDoRpc Function 0x55 */ typedef [enum8bit] enum { MNID_ID = 0, MNID_STRING = 1 } ulKind; typedef struct { uint8 length; [flag(STR_NULLTERM)] string lpwstrName; } LPWSTR; typedef [nodiscriminant] union { [case(MNID_ID)] uint32 lid; [case(MNID_STRING)] LPWSTR lpwstr; } Kind; typedef [flag(NDR_NOALIGN)] struct { ulKind ulKind; GUID lpguid; [switch_is(ulKind)] Kind kind; } MAPINAMEID; typedef [flag(NDR_NOALIGN)] struct { MAPITAGS ulPropTag; } GetNamesFromIDs_req; typedef [flag(NDR_NOALIGN)] struct { uint16 count; MAPINAMEID nameid[count]; } GetNamesFromIDs_repl; /*************************/ /* EcDoRpc Function 0x56 */ typedef [flag(NDR_NOALIGN)] struct { uint8 ulFlags; uint16 count; MAPINAMEID nameid[count]; } GetIDsFromNames_req; typedef [flag(NDR_NOALIGN)] struct { uint16 count; uint16 propID[count]; } GetIDsFromNames_repl; /*************************/ /* EcDoRpc Function 0x58 */ typedef [flag(NDR_NOALIGN)] struct { uint16 unknown; } EmptyFolder_req; typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; } EmptyFolder_repl; /*************************/ /* EcDoRpc Function 0x59 */ typedef [flag(NDR_NOALIGN)] struct { uint16 MaxRowCount; hyper CategoryId; } ExpandRow_req; typedef [flag(NDR_NOALIGN)] struct { uint32 ExpandedRowCount; uint16 RowCount; [flag(NDR_REMAINING)]DATA_BLOB RowData; } ExpandRow_repl; /*************************/ /* EcDoRpc Function 0x5a */ typedef [flag(NDR_NOALIGN)] struct { hyper CategoryId; } CollapseRow_req; typedef [flag(NDR_NOALIGN)] struct { uint32 CollapsedRowCount; } CollapseRow_repl; /*************************/ /* EcDoRpc Function 0x5d */ typedef [flag(NDR_NOALIGN)] struct { } CommitStream_req; typedef [flag(NDR_NOALIGN)] struct { } CommitStream_repl; /*************************/ /* EcDoRpc Function 0x5e */ typedef [flag(NDR_NOALIGN)] struct { } GetStreamSize_req; typedef [flag(NDR_NOALIGN)] struct { uint32 StreamSize; } GetStreamSize_repl; /*************************/ /* EcDoRpc Function 0x5f */ typedef [flag(NDR_NOALIGN)] struct { uint16 propID; } QueryNamesFromIDs_req; typedef [flag(NDR_NOALIGN)] struct { uint16 count; uint16 propID[count]; MAPINAMEID nameid[count]; } QueryNamesFromIDs_repl; /*************************/ /* EcDoRpc Function 0x66 */ typedef [bitmap8bit] bitmap { SuppressReceipt = 0x1, /* Cancel read receipt. set Read bit */ ClearReadFlag = 0x4, /* Clear the read bit. Requires |0x1 as well */ GenerateReadReceiptOnly = 0x10, /* Send read report, don't change Read bit */ ClearNotifyRead = 0x20, /* Clear the Notify Read */ ClearNotifyUnRead = 0x40 /* Clear the Notify UnRead bit */ } ReadFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; boolean8 WantAsynchronous; ReadFlags ReadFlags; uint16 MessageIdCount; hyper MessageIds[MessageIdCount]; } SetReadFlags_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 PartialCompletion; } SetReadFlags_repl; /*************************/ /* EcDoRpc Function 0x67 */ typedef [bitmap8bit] bitmap { CopyFlagsMove = 0x1, /* Move properties */ CopyFlagsNoOverwrite = 0x2 /* Do not overwrite existing properties */ } CopyFlags; typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; boolean8 WantAsynchronous; CopyFlags CopyFlags; uint16 count; MAPITAGS property_tag[count]; } CopyProperties_req; typedef [flag(NDR_NOALIGN)] struct { uint32 index; /* index into array of property tags */ MAPITAGS property_tag; /* property for which there was an error */ MAPISTATUS error_code; /* the error that occurred for this property */ } PropertyProblem; typedef [flag(NDR_NOALIGN)] struct { uint16 count; PropertyProblem property_problems[count]; } CopyProperties_repl; /*************************/ /* EcDoRpc Function 0x68 */ typedef [flag(NDR_NOALIGN)] struct { uint8 unknown; hyper fid; astring lpszMessageClass; FILETIME modiftime; } ReceiveFolder; typedef [flag(NDR_NOALIGN)] struct { } GetReceiveFolderTable_req; typedef [flag(NDR_NOALIGN)] struct { uint32 cValues; ReceiveFolder entries[cValues]; } GetReceiveFolderTable_repl; /*************************/ /* EcDoRpc Function 0x6b */ typedef [flag(NDR_NOALIGN)] struct { hyper RowId; uint32 RowInstanceNumber; } GetCollapseState_req; typedef [flag(NDR_NOALIGN)] struct { SBinary_short CollapseState; } GetCollapseState_repl; /*************************/ /* EcDoRpc Function 0x6c */ typedef [flag(NDR_NOALIGN)] struct { SBinary_short CollapseState; } SetCollapseState_req; typedef [flag(NDR_NOALIGN)] struct { SBinary_short bookmark; } SetCollapseState_repl; /*************************/ /* EcDoRpc Function 0x6d */ typedef [flag(NDR_NOALIGN)] struct { } GetTransportFolder_req; typedef [flag(NDR_NOALIGN)] struct { hyper FolderId; } GetTransportFolder_repl; /*************************/ /* EcDoRpc Function 0x7f */ typedef [flag(NDR_NOALIGN)] struct { uint32 IdCount; } GetLocalReplicaIds_req; typedef [flag(NDR_NOALIGN)] struct { GUID ReplGuid; uint8 GlobalCount[6]; } GetLocalReplicaIds_repl; /*************************/ /* EcDoRpc Function 0x81 */ typedef [flag(NDR_NOALIGN)] struct { /* no args */ } ResetTable_req; typedef [flag(NDR_NOALIGN)] struct { /* no args */ } ResetTable_repl; /*************************/ /* EcDoRpc Function 0x87 */ typedef [flag(NDR_NOALIGN)] struct { uint8 handle_idx; asclstr name; } OpenPublicFolderByName_req; typedef [flag(NDR_NOALIGN)] struct { boolean8 HasRules; boolean8 IsGhosted; } OpenPublicFolderByName_repl; /*************************/ /* EcDoRpc Function 0x89 */ typedef [flag(NDR_NOALIGN)] struct { SBinary_short bookmark; } FreeBookmark_req; typedef [flag(NDR_NOALIGN)] struct { /* no args */ } FreeBookmark_repl; /*************************/ /* EcDoRpc Function 0xFE */ typedef [enum8bit] enum { Private = 0x1, UnderCover = 0x2, Ghosted = 0x4, SpIProcess = 0x8 } LogonFlags; typedef [bitmap32bit] bitmap { PUBLIC = 0x2, HOME_LOGON = 0x4, TAKE_OWNERSHIP = 0x8, ALTERNATE_SERVER = 0x100, IGNORE_HOME_MDB = 0x200, NO_MAIL = 0x400, USE_PER_MDB_REPLID_MAPPING = 0x010000000 } OpenFlags; typedef [bitmap32bit] bitmap { STORE_HAS_SEARCHES = 0x010000000 } StoreState; typedef [flag(NDR_NOALIGN)] struct { LogonFlags LogonFlags; OpenFlags OpenFlags; StoreState StoreState; ascstr3 LegacyDN; } Logon_req; typedef [flag(NDR_NOALIGN)] struct { hyper folder_id[13]; uint16 unknown; MAPIUID entryid; MAPIUID msgstore; } store_pf; typedef [flag(NDR_NOALIGN)] struct { hyper folder_id[13]; uint8 unknown3; MAPIUID entryid; uint16 default_store; MAPIUID msgstore; FILETIME ts_access; astring creation_date; uint8 terminator; uint16 unknown4; } store_mailbox; typedef [nodiscriminant] union { [case(0x0)] store_pf store_pf; [case(0x1)] store_mailbox store_mailbox; } store_type; typedef [enum8bit,flag(NDR_NOALIGN)] enum { PROVIDER_TYPE_PF = 0x0, PROVIDER_TYPE_MAILBOX = 0x1 } PROVIDER_TYPE; typedef [flag(NDR_NOALIGN)] struct { PROVIDER_TYPE PR_OBJECT_TYPE; [switch_is(PR_OBJECT_TYPE)] store_type type; } Logon_repl; typedef [public, nodiscriminant] union { [case(op_MAPI_Release)] Release_req mapi_Release; [case(op_MAPI_OpenFolder)] OpenFolder_req mapi_OpenFolder; [case(op_MAPI_OpenMessage)] OpenMessage_req mapi_OpenMessage; [case(op_MAPI_GetHierarchyTable)] GetHierarchyTable_req mapi_GetHierarchyTable; [case(op_MAPI_GetContentsTable)] GetContentsTable_req mapi_GetContentsTable; [case(op_MAPI_CreateMessage)] CreateMessage_req mapi_CreateMessage; [case(op_MAPI_GetProps)] GetProps_req mapi_GetProps; [case(op_MAPI_GetPropsAll)] GetPropsAll_req mapi_GetPropsAll; [case(op_MAPI_GetPropList)] GetPropList_req mapi_GetPropList; [case(op_MAPI_SetProps)] SetProps_req mapi_SetProps; [case(op_MAPI_DeleteProps)] DeleteProps_req mapi_DeleteProps; [case(op_MAPI_SaveChangesMessage)] SaveChangesMessage_req mapi_SaveChangesMessage; [case(op_MAPI_SetMessageReadFlag)] SetMessageReadFlag_req mapi_SetMessageReadFlag; [case(op_MAPI_SetColumns)] SetColumns_req mapi_SetColumns; [case(op_MAPI_SortTable)] SortTable_req mapi_SortTable; [case(op_MAPI_Restrict)] Restrict_req mapi_Restrict; [case(op_MAPI_RemoveAllRecipients)] RemoveAllRecipients_req mapi_RemoveAllRecipients; [case(op_MAPI_ModifyRecipients)] ModifyRecipients_req mapi_ModifyRecipients; [case(op_MAPI_ReadRecipients)] ReadRecipients_req mapi_ReadRecipients; [case(op_MAPI_QueryRows)] QueryRows_req mapi_QueryRows; [case(op_MAPI_GetStatus)] GetStatus_req mapi_GetStatus; [case(op_MAPI_GetRowCount)] GetRowCount_req mapi_GetRowCount; [case(op_MAPI_SeekRow)] SeekRow_req mapi_SeekRow; [case(op_MAPI_SeekRowBookmark)] SeekRowBookmark_req mapi_SeekRowBookmark; [case(op_MAPI_SeekRowApprox)] SeekRowApprox_req mapi_SeekRowApprox; [case(op_MAPI_CreateBookmark)] CreateBookmark_req mapi_CreateBookmark; [case(op_MAPI_CreateFolder)] CreateFolder_req mapi_CreateFolder; [case(op_MAPI_DeleteFolder)] DeleteFolder_req mapi_DeleteFolder; [case(op_MAPI_DeleteMessages)] DeleteMessages_req mapi_DeleteMessages; [case(op_MAPI_GetMessageStatus)] GetMessageStatus_req mapi_GetMessageStatus; [case(op_MAPI_SetMessageStatus)] SetMessageStatus_req mapi_SetMessageStatus; [case(op_MAPI_GetAttachmentTable)] GetAttachmentTable_req mapi_GetAttachmentTable; [case(op_MAPI_OpenAttach)] OpenAttach_req mapi_OpenAttach; [case(op_MAPI_CreateAttach)] CreateAttach_req mapi_CreateAttach; [case(op_MAPI_DeleteAttach)] DeleteAttach_req mapi_DeleteAttach; [case(op_MAPI_SaveChanges)] SaveChanges_req mapi_SaveChanges; [case(op_MAPI_SetReceiveFolder)] SetReceiveFolder_req mapi_SetReceiveFolder; [case(op_MAPI_GetReceiveFolder)] GetReceiveFolder_req mapi_GetReceiveFolder; [case(op_MAPI_Advise)] Advise_req mapi_Advise; [case(op_MAPI_OpenStream)] OpenStream_req mapi_OpenStream; [case(op_MAPI_ReadStream)] ReadStream_req mapi_ReadStream; [case(op_MAPI_WriteStream)] WriteStream_req mapi_WriteStream; [case(op_MAPI_SeekStream)] SeekStream_req mapi_SeekStream; [case(op_MAPI_SetStreamSize)] SetStreamSize_req mapi_SetStreamSize; [case(op_MAPI_SetSearchCriteria)] SetSearchCriteria_req mapi_SetSearchCriteria; [case(op_MAPI_GetSearchCriteria)] GetSearchCriteria_req mapi_GetSearchCriteria; [case(op_MAPI_SubmitMessage)] SubmitMessage_req mapi_SubmitMessage; [case(op_MAPI_MoveCopyMessages)] MoveCopyMessages_req mapi_MoveCopyMessages; [case(op_MAPI_AbortSubmit)] AbortSubmit_req mapi_AbortSubmit; [case(op_MAPI_MoveFolder)] MoveFolder_req mapi_MoveFolder; [case(op_MAPI_CopyFolder)] CopyFolder_req mapi_CopyFolder; [case(op_MAPI_QueryColumnsAll)] QueryColumnsAll_req mapi_QueryColumnsAll; [case(op_MAPI_Abort)] Abort_req mapi_Abort; [case(op_MAPI_CopyToStream)] CopyToStream_req mapi_CopyToStream; [case(op_MAPI_GetTable)] GetTable_req mapi_GetTable; [case(op_MAPI_GetRulesTable)] GetRulesTable_req mapi_GetRulesTable; [case(op_MAPI_ModifyTable)] ModifyTable_req mapi_ModifyTable; [case(op_MAPI_SetSpooler)] SetSpooler_req mapi_SetSpooler; [case(op_MAPI_SpoolerLockMessage)] SpoolerLockMessage_req mapi_SpoolerLockMessage; [case(op_MAPI_AddressTypes)] AddressTypes_req mapi_AddressTypes; [case(op_MAPI_TransportSend)] TransportSend_req mapi_TransportSend; [case(op_MAPI_FindRow)] FindRow_req mapi_FindRow; [case(op_MAPI_GetNamesFromIDs)] GetNamesFromIDs_req mapi_GetNamesFromIDs; [case(op_MAPI_GetIDsFromNames)] GetIDsFromNames_req mapi_GetIDsFromNames; [case(op_MAPI_EmptyFolder)] EmptyFolder_req mapi_EmptyFolder; [case(op_MAPI_ExpandRow)] ExpandRow_req mapi_ExpandRow; [case(op_MAPI_CollapseRow)] CollapseRow_req mapi_CollapseRow; [case(op_MAPI_CommitStream)] CommitStream_req mapi_CommitStream; [case(op_MAPI_GetStreamSize)] GetStreamSize_req mapi_GetStreamSize; [case(op_MAPI_QueryNamesFromIDs)] QueryNamesFromIDs_req mapi_QueryNamesFromIDs; [case(op_MAPI_CopyProperties)] CopyProperties_req mapi_CopyProperties; [case(op_MAPI_GetReceiveFolderTable)] GetReceiveFolderTable_req mapi_GetReceiveFolderTable; [case(op_MAPI_GetCollapseState)] GetCollapseState_req mapi_GetCollapseState; [case(op_MAPI_SetCollapseState)] SetCollapseState_req mapi_SetCollapseState; [case(op_MAPI_GetTransportFolder)] GetTransportFolder_req mapi_GetTransportFolder; [case(op_MAPI_GetLocalReplicaIds)] GetLocalReplicaIds_req mapi_GetLocalReplicaIds; [case(op_MAPI_ResetTable)] ResetTable_req mapi_ResetTable; [case(op_MAPI_OpenPublicFolderByName)] OpenPublicFolderByName_req mapi_OpenPublicFolderByName; [case(op_MAPI_FreeBookmark)] FreeBookmark_req mapi_FreeBookmark; [case(op_MAPI_Logon)] Logon_req mapi_Logon; } EcDoRpc_MAPI_REQ_UNION; typedef [public, nodiscriminant] union { [case(op_MAPI_Release)] Release_repl mapi_Release; [case(op_MAPI_OpenFolder)] OpenFolder_repl mapi_OpenFolder; [case(op_MAPI_OpenMessage)] OpenMessage_repl mapi_OpenMessage; [case(op_MAPI_GetHierarchyTable)] GetHierarchyTable_repl mapi_GetHierarchyTable; [case(op_MAPI_GetContentsTable)] GetContentsTable_repl mapi_GetContentsTable; [case(op_MAPI_CreateMessage)] CreateMessage_repl mapi_CreateMessage; [case(op_MAPI_GetProps)] GetProps_repl mapi_GetProps; [case(op_MAPI_GetPropsAll)] GetPropsAll_repl mapi_GetPropsAll; [case(op_MAPI_GetPropList)] GetPropList_repl mapi_GetPropList; [case(op_MAPI_SetProps)] SetProps_repl mapi_SetProps; [case(op_MAPI_DeleteProps)] DeleteProps_repl mapi_DeleteProps; [case(op_MAPI_SaveChangesMessage)] SaveChangesMessage_repl mapi_SaveChangesMessage; [case(op_MAPI_RemoveAllRecipients)] RemoveAllRecipients_repl mapi_RemoveAllRecipients; [case(op_MAPI_ModifyRecipients)] ModifyRecipients_repl mapi_ModifyRecipients; [case(op_MAPI_ReadRecipients)] ReadRecipients_repl mapi_ReadRecipients; [case(op_MAPI_SetMessageReadFlag)] SetMessageReadFlag_repl mapi_SetMessageReadFlag; [case(op_MAPI_SetColumns)] SetColumns_repl mapi_SetColumns; [case(op_MAPI_SortTable)] SortTable_repl mapi_SortTable; [case(op_MAPI_Restrict)] Restrict_repl mapi_Restrict; [case(op_MAPI_QueryRows)] QueryRows_repl mapi_QueryRows; [case(op_MAPI_GetStatus)] GetStatus_repl mapi_GetStatus; [case(op_MAPI_GetRowCount)] GetRowCount_repl mapi_GetRowCount; [case(op_MAPI_SeekRow)] SeekRow_repl mapi_SeekRow; [case(op_MAPI_SeekRowBookmark)] SeekRowBookmark_repl mapi_SeekRowBookmark; [case(op_MAPI_SeekRowApprox)] SeekRowApprox_repl mapi_SeekRowApprox; [case(op_MAPI_CreateBookmark)] CreateBookmark_repl mapi_CreateBookmark; [case(op_MAPI_CreateFolder)] CreateFolder_repl mapi_CreateFolder; [case(op_MAPI_DeleteFolder)] DeleteFolder_repl mapi_DeleteFolder; [case(op_MAPI_DeleteMessages)] DeleteMessages_repl mapi_DeleteMessages; [case(op_MAPI_SetMessageStatus)] SetMessageStatus_repl mapi_SetMessageStatus; [case(op_MAPI_GetAttachmentTable)] GetAttachmentTable_repl mapi_GetAttachmentTable; [case(op_MAPI_OpenAttach)] OpenAttach_repl mapi_OpenAttach; [case(op_MAPI_CreateAttach)] CreateAttach_repl mapi_CreateAttach; [case(op_MAPI_DeleteAttach)] DeleteAttach_repl mapi_DeleteAttach; [case(op_MAPI_SaveChanges)] SaveChanges_repl mapi_SaveChanges; [case(op_MAPI_SetReceiveFolder)] SetReceiveFolder_repl mapi_SetReceiveFolder; [case(op_MAPI_GetReceiveFolder)] GetReceiveFolder_repl mapi_GetReceiveFolder; [case(op_MAPI_Advise)] Advise_repl mapi_Advise; [case(op_MAPI_Notify)] Notify_repl mapi_Notify; [case(op_MAPI_OpenStream)] OpenStream_repl mapi_OpenStream; [case(op_MAPI_ReadStream)] ReadStream_repl mapi_ReadStream; [case(op_MAPI_WriteStream)] WriteStream_repl mapi_WriteStream; [case(op_MAPI_SeekStream)] SeekStream_repl mapi_SeekStream; [case(op_MAPI_SetStreamSize)] SetStreamSize_repl mapi_SetStreamSize; [case(op_MAPI_SetSearchCriteria)] SetSearchCriteria_repl mapi_SetSearchCriteria; [case(op_MAPI_GetSearchCriteria)] GetSearchCriteria_repl mapi_GetSearchCriteria; [case(op_MAPI_SubmitMessage)] SubmitMessage_repl mapi_SubmitMessage; [case(op_MAPI_MoveCopyMessages)] MoveCopyMessages_repl mapi_MoveCopyMessages; [case(op_MAPI_AbortSubmit)] AbortSubmit_repl mapi_AbortSubmit; [case(op_MAPI_MoveFolder)] MoveFolder_repl mapi_MoveFolder; [case(op_MAPI_CopyFolder)] CopyFolder_repl mapi_CopyFolder; [case(op_MAPI_QueryColumnsAll)] QueryColumnsAll_repl mapi_QueryColumnsAll; [case(op_MAPI_Abort)] Abort_repl mapi_Abort; [case(op_MAPI_CopyToStream)] CopyToStream_repl mapi_CopyToStream; [case(op_MAPI_GetTable)] GetTable_repl mapi_GetTable; [case(op_MAPI_GetRulesTable)] GetRulesTable_repl mapi_GetRulesTable; [case(op_MAPI_ModifyTable)] ModifyTable_repl mapi_ModifyTable; [case(op_MAPI_SetSpooler)] SetSpooler_repl mapi_SetSpooler; [case(op_MAPI_SpoolerLockMessage)] SpoolerLockMessage_repl mapi_SpoolerLockMessage; [case(op_MAPI_AddressTypes)] AddressTypes_repl mapi_AddressTypes; [case(op_MAPI_TransportSend)] TransportSend_repl mapi_TransportSend; [case(op_MAPI_FindRow)] FindRow_repl mapi_FindRow; [case(op_MAPI_GetNamesFromIDs)] GetNamesFromIDs_repl mapi_GetNamesFromIDs; [case(op_MAPI_GetIDsFromNames)] GetIDsFromNames_repl mapi_GetIDsFromNames; [case(op_MAPI_EmptyFolder)] EmptyFolder_repl mapi_EmptyFolder; [case(op_MAPI_ExpandRow)] ExpandRow_repl mapi_ExpandRow; [case(op_MAPI_CollapseRow)] CollapseRow_repl mapi_CollapseRow; [case(op_MAPI_CommitStream)] CommitStream_repl mapi_CommitStream; [case(op_MAPI_GetStreamSize)] GetStreamSize_repl mapi_GetStreamSize; [case(op_MAPI_QueryNamesFromIDs)] QueryNamesFromIDs_repl mapi_QueryNamesFromIDs; [case(op_MAPI_CopyProperties)] CopyProperties_repl mapi_CopyProperties; [case(op_MAPI_GetReceiveFolderTable)] GetReceiveFolderTable_repl mapi_GetReceiveFolderTable; [case(op_MAPI_GetCollapseState)] GetCollapseState_repl mapi_GetCollapseState; [case(op_MAPI_SetCollapseState)] SetCollapseState_repl mapi_SetCollapseState; [case(op_MAPI_GetTransportFolder)] GetTransportFolder_repl mapi_GetTransportFolder; [case(op_MAPI_ResetTable)] ResetTable_repl mapi_ResetTable; [case(op_MAPI_GetLocalReplicaIds)] GetLocalReplicaIds_repl mapi_GetLocalReplicaIds; [case(op_MAPI_OpenPublicFolderByName)] OpenPublicFolderByName_repl mapi_OpenPublicFolderByName; [case(op_MAPI_FreeBookmark)] FreeBookmark_repl mapi_FreeBookmark; [case(op_MAPI_Logon)] Logon_repl mapi_Logon; } EcDoRpc_MAPI_REPL_UNION; typedef [public,flag(NDR_NOALIGN)] struct { uint8 opnum; uint8 logon_id; uint8 handle_idx; [switch_is(opnum)] EcDoRpc_MAPI_REQ_UNION u; } EcDoRpc_MAPI_REQ; typedef [public,nopull,noprint,flag(NDR_NOALIGN)] struct { uint8 opnum; uint8 handle_idx; MAPISTATUS error_code; [switch_is(opnum)] EcDoRpc_MAPI_REPL_UNION u; } EcDoRpc_MAPI_REPL; /* Abstract way to represent MAPI content */ typedef [public,nopull,nopush,noprint] struct { uint32 mapi_len; /* whole mapi_data length */ uint16 length; /* content length */ EcDoRpc_MAPI_REQ *mapi_req; uint32 *handles; /* handles id array */ } mapi_request; typedef [public,nopull,nopush,noprint] struct { uint32 mapi_len; uint16 length; EcDoRpc_MAPI_REPL *mapi_repl; uint32 *handles; } mapi_response; [public,flag(NDR_NOALIGN)] MAPISTATUS EcDoRpc( [in,out] policy_handle *handle, [in,out] uint32 size, [in,out] uint32 offset, [in][subcontext(4),flag(NDR_REMAINING|NDR_NOALIGN)] mapi_request *mapi_request, [out][subcontext(4),flag(NDR_REMAINING|NDR_NOALIGN)] mapi_response *mapi_response, [in,out] uint16 *length, [in] uint16 max_data ); /*****************/ /* Function 0x03 */ void EcGetMoreRpc(); /*****************/ /* Function 0x04 */ /* we could directly use a NOTIFKEY structure rather than a uint8 array, but this makes the IDL more robust sockaddr array is made of: - family (unsigned short in) sa_family_t - address data sa_data[14]; */ typedef struct { uint16 cb; uint8 ab[cb]; } NOTIFKEY; MAPISTATUS EcRRegisterPushNotification( [in,out] policy_handle *handle, [in] ulEventType ulEventMask, [in, size_is(notif_len)] uint8 notifkey[*], [in] uint16 notif_len, [in] uint32 unknown2, [in, size_is(sockaddr_len)] uint8 sockaddr[*], [in] uint16 sockaddr_len, [out,ref] uint32 *retval ); /*****************/ /* Function 0x05 */ MAPISTATUS EcRUnregisterPushNotification( [in,out] policy_handle *handle, [in] uint32 unknown[2] ); /*****************/ /* Function 0x06 */ void EcDummyRpc(); /*****************/ /* Function 0x07 */ void EcRGetDCName(); /*****************/ /* Function 0x08 */ void EcRNetGetDCName(); /*****************/ /* Function 0x09 */ void EcDoRpcExt(); } [ uuid("c840a7dc-42c0-1a10-b4b9-08002b2fe182"), pointer_default(unique), helpstring("Unknown") ] interface exchange_unknown { void unknown_dummy(); }