-
Notifications
You must be signed in to change notification settings - Fork 5
/
exchange.idl
4699 lines (4063 loc) · 141 KB
/
exchange.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include "idl_types.h"
cpp_quote("#include <gen_ndr/ndr_misc.h>")
/*
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"),
endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:[]"),
authservice("exchangeRFR"),
pointer_default(unique),
version(1.0),
helpstring("Exchange 2003 Directory Request For Response")
] interface exchange_ds_rfr
{
#include "properties_enum.h"
#include "mapicodes_enum.h"
/*****************/
/* Function 0x00 */
MAPISTATUS RfrGetNewDSA(
[in] uint32 ulFlags,
[in,string,charset(DOS)] uint8 *pUserDN,
[in,out,unique,string,charset(DOS)] uint8 **ppszUnused,
[in,out,unique,string,charset(DOS)] uint8 **ppszServer
);
/*****************/
/* Function 0x01 */
MAPISTATUS RfrGetFQDNFromLegacyDN(
[in] uint32 ulFlags,
[in,range(10,1024)] uint32 cbMailboxServerDN,
[in,string,charset(DOS),size_is(cbMailboxServerDN)] uint8 *szMailboxServerDN,
[out,ref,string,charset(DOS)] uint8 **ppszServerFQDN
);
}
[
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:[]"),
authservice("exchangeAB"),
pointer_default(unique),
version(56.0),
helpstring("Exchange 5.5 Name Service Provider")
] interface exchange_nsp
{
#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_ACTIONS 0x00fe
#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
typedef [v1_enum] enum {
SortTypeDisplayName = 0x00000000,
SortTypePhoneticDisplayName = 0x00000003,
SortTypeDisplayName_RO = 0x000003E8,
SortTypeDisplayName_W = 0x000003E9
} TableSortOrders;
typedef [v1_enum] enum {
MID_BEGINNING_OF_TABLE = 0x0,
MID_END_OF_TABLE = 0x2,
MID_CURRENT = 0x1
} NSPI_MID;
typedef struct {
TableSortOrders SortType;
uint32 ContainerID;
NSPI_MID CurrentRec;
int32 Delta;
uint32 NumPos;
uint32 TotalRecs;
uint32 CodePage;
uint32 TemplateLocale;
uint32 SortLocale;
} STAT;
typedef struct {
uint8 ab[16];
} FlatUID_r;
/* like a SPropTagArray, but without the "value is a an enum MAPITAGS" semantics */
typedef struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues+1), length_is(cValues)] uint32 aulPropTag[];
} PropertyTagArray_r;
typedef struct {
FlatUID_r *lpguid;
uint32 ulReserved;
uint32 lID;
} PropertyName_r;
typedef struct {
[range(0,100000)] uint32 cNames;
[size_is(cNames)] PropertyName_r aNames[];
} PropertyNameSet_r;
typedef struct {
[range(0,100000)] uint32 cValues;
[string,size_is(cValues),charset(DOS)] uint8 **lppszA;
} StringArray_r;
typedef struct {
[range(0,100000)] uint32 Count;
[string,size_is(Count),charset(DOS)] uint8 *Strings[];
} StringsArray_r;
typedef struct {
[range(0,100000)] uint32 cValues;
[string,size_is(cValues),charset(UTF16)] uint16 **lppszW;
} StringArrayW_r;
typedef struct {
[range(0,100000)] uint32 Count;
[string,size_is(Count),charset(UTF16)] uint16 *Strings[];
} StringsArrayW_r;
typedef struct {
[range(0,100001)] uint32 cValues;
[size_is(cValues+1),length_is(cValues)] MAPITAGS aulPropTag[];
} SPropTagArray;
typedef [public,noprint] struct {
[range(0,2097152)] uint32 cb;
[size_is(cb)] uint8 *lpb;
} Binary_r;
typedef [public] struct {
uint32 dwLowDateTime;
uint32 dwHighDateTime;
} FILETIME;
typedef struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues)] uint16 *lpi;
} ShortArray_r;
typedef struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues)] uint32 *lpl;
} LongArray_r;
typedef struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues)] Binary_r *lpbin;
} BinaryArray_r;
typedef struct {
[range(0,100000)]uint32 cValues;
[size_is(cValues)] FlatUID_r **lpguid;
} FlatUIDArray_r;
typedef struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues)] FILETIME *lpft;
} DateTimeArray_r;
typedef [switch_type(uint32)] union {
[case(PT_I2)] uint16 i;
[case(PT_LONG)] uint32 l;
[case(PT_BOOLEAN)] uint8 b;
[case(PT_STRING8)][unique][string,charset(DOS)] uint8 *lpszA;
[case(PT_UNICODE)][string,charset(UTF16)] uint16 *lpszW;
[case(PT_BINARY)] Binary_r bin;
[case(PT_SVREID)] Binary_r bin;
[case(PT_CLSID)] FlatUID_r *lpguid;
[case(PT_SYSTIME)] FILETIME ft;
[case(PT_ERROR)] MAPISTATUS err;
[case(PT_MV_I2)] ShortArray_r MVi;
[case(PT_MV_LONG)] LongArray_r MVl;
[case(PT_MV_STRING8)] StringArray_r MVszA;
[case(PT_MV_BINARY)] BinaryArray_r MVbin;
[case(PT_MV_CLSID)] FlatUIDArray_r MVguid;
[case(PT_MV_UNICODE)] StringArrayW_r MVszW;
[case(PT_MV_SYSTIME)] DateTimeArray_r MVft;
[case(PT_NULL)] uint32 null;
} PROP_VAL_UNION;
typedef [public]struct {
MAPITAGS ulPropTag;
uint32 dwAlignPad;
[switch_is(ulPropTag & 0xFFFF)] PROP_VAL_UNION value;
} PropertyValue_r;
typedef struct {
uint32 Reserved;
[range(0,100000)] uint32 cValues;
[size_is(cValues)] PropertyValue_r *lpProps;
} PropertyRow_r;
typedef [public] struct {
[range(0,100000)] uint32 cRows;
[size_is(cRows)] PropertyRow_r aRow[];
} PropertyRowSet_r;
typedef struct {
[range(0,100000)] uint32 cRes;
[size_is(cRes)] Restriction_r *lpRes;
} AndRestriction_r;
typedef struct {
[range(0,100000)] uint32 cRes;
[size_is(cRes)] Restriction_r *lpRes;
} OrRestriction_r;
typedef struct {
Restriction_r *lpRes;
} NotRestriction_r;
typedef struct {
uint32 ulFuzzyLevel;
MAPITAGS ulPropTag;
PropertyValue_r *lpProp;
} ContentRestriction_r;
typedef struct {
uint32 relop;
MAPITAGS ulPropTag;
PropertyValue_r *lpProp;
} PropertyRestriction_r;
typedef struct {
uint32 relop;
MAPITAGS ulPropTag1;
MAPITAGS ulPropTag2;
} ComparePropsRestriction_r;
typedef struct {
uint32 relMBR;
MAPITAGS ulPropTag;
uint32 ulMask;
} BitMaskRestriction_r;
typedef struct {
uint32 relop;
MAPITAGS ulPropTag;
uint32 cb;
} SizeRestriction_r;
typedef struct {
uint32 ulReserved1;
MAPITAGS ulPropTag;
uint32 ulReserved2;
} ExistRestriction_r;
typedef struct {
uint32 ulSubObject;
Restriction_r *lpRes;
} SubRestriction_r;
typedef [v1_enum] enum {
RES_AND = 0x0,
RES_OR = 0x1,
RES_NOT = 0x2,
RES_CONTENT = 0x3,
RES_PROPERTY = 0x4,
RES_COMPAREPROPS = 0x5,
RES_BITMASK = 0x6,
RES_SIZE = 0x7,
RES_EXIST = 0x8,
RES_SUBRESTRICTION = 0x9,
RES_COMMENT = 0xA
} RestrictionType_r;
typedef [switch_type(uint32)] union {
[case(RES_AND)] AndRestriction_r resAnd;
[case(RES_OR)] OrRestriction_r resOr;
[case(RES_NOT)] NotRestriction_r resNot;
[case(RES_CONTENT)] ContentRestriction_r resContent;
[case(RES_PROPERTY)] PropertyRestriction_r resProperty;
[case(RES_COMPAREPROPS)] ComparePropsRestriction_r resCompareProps;
[case(RES_BITMASK)] BitMaskRestriction_r resBitMask;
[case(RES_SIZE)] SizeRestriction_r resSize;
[case(RES_EXIST)] ExistRestriction_r resExist;
[case(RES_SUBRESTRICTION)] SubRestriction_r resSub;
} RestrictionUnion_r;
typedef [public] struct _Restriction_r{
RestrictionType_r rt;
[switch_is(rt)] RestrictionUnion_r res;
} Restriction_r;
/* Note:
Those structs are used only internally by libmapi, the server code
and the backend code, in order to provide 32 bits lengths to
certain members (contrarily to mapi_SPropValue) and enable
type-independence between different operations.
They are derived from the PropertyValue_r/Row_r/RowSet_r structs
and enhance them with certain types that are absent from NSPI and
would otherwise break the data alignment on wire operations.
However, they must be defined here as they make use of the same array types. */
typedef [nopush,nopull,noprint] struct {
[range(0,100000)] uint32 cValues;
[size_is(cValues)] hyper *lpui8;
} UI8Array_r;
typedef [switch_type(uint32),nopush,nopull,noprint] union {
[case(PT_I2)] uint16 i;
[case(PT_LONG)] uint32 l;
[case(PT_DOUBLE)] double dbl;
[case(PT_BOOLEAN)] uint8 b;
[case(PT_I8)] dlong d;
[case(PT_STRING8)][unique][string,charset(DOS)] uint8 *lpszA;
[case(PT_BINARY)] Binary_r bin;
[case(PT_SVREID)] Binary_r bin;
[case(PT_UNICODE)][string,charset(UTF16)] uint16 *lpszW;
[case(PT_CLSID)] FlatUID_r *lpguid;
[case(PT_SYSTIME)] FILETIME ft;
[case(PT_ERROR)] MAPISTATUS err;
[case(PT_MV_I2)] ShortArray_r MVi;
[case(PT_MV_LONG)] LongArray_r MVl;
[case(PT_MV_I8)] UI8Array_r MVui8;
[case(PT_MV_STRING8)] StringArray_r MVszA;
[case(PT_MV_BINARY)] BinaryArray_r MVbin;
[case(PT_MV_CLSID)] FlatUIDArray_r MVguid;
[case(PT_MV_UNICODE)] StringArrayW_r MVszW;
[case(PT_MV_SYSTIME)] DateTimeArray_r MVft;
[case(PT_NULL)] uint32 null;
[case(PT_OBJECT)] uint32 object;
} SPropValue_CTR;
typedef [public,noprint,nopush,nopull] struct {
MAPITAGS ulPropTag;
uint32 dwAlignPad;
[switch_is(ulPropTag & 0xFFFF)] SPropValue_CTR value;
} SPropValue;
typedef [public,noprint,nopush,nopull] struct {
uint32 ulAdrEntryPad;
[range(0,100000)] uint32 cValues;
[size_is(cValues)]SPropValue *lpProps;
} SRow;
typedef [public,noprint,nopush,nopull] struct {
[range(0,100000)] uint32 cRows;
[size_is(cRows)] SRow aRow[];
} SRowSet;
/* /internal types */
/*****************/
/* Function 0x00 */
typedef [bitmap32bit] bitmap {
fAnonymousLogin = 0x00000020
} NspiBind_dwFlags;
MAPISTATUS NspiBind(
[in] NspiBind_dwFlags dwFlags,
[in] STAT *pStat,
[in,out,unique] GUID *mapiuid,
[out] policy_handle *handle
);
/*****************/
/* Function 0x01 */
MAPISTATUS NspiUnbind(
[in, out] policy_handle *handle,
[in] uint32 Reserved
);
/*****************/
/* Function 0x02 */
MAPISTATUS NspiUpdateStat(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in,out] STAT *pStat,
[in,out,unique] uint32 *plDelta
);
/*****************/
/* Function 0x03 */
typedef [bitmap32bit] bitmap {
fSkipObjects = 0x00000001,
fEphID = 0x00000002
} NspiQueryRows_dwFlags;
MAPISTATUS NspiQueryRows(
[in] policy_handle *handle,
[in] NspiQueryRows_dwFlags dwFlags,
[in,out] STAT *pStat,
[in,range(0,100000)] uint32 dwETableCount,
[in,unique,size_is(dwETableCount)] uint32 *lpETable,
[in] uint32 Count,
[in,unique] SPropTagArray *pPropTags,
[out] PropertyRowSet_r **ppRows
);
/*****************/
/* Function 0x04 */
MAPISTATUS NspiSeekEntries(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in,out] STAT *pStat,
[in] PropertyValue_r *pTarget,
[in,unique] PropertyTagArray_r *lpETable,
[in,unique] SPropTagArray *pPropTags,
[out] PropertyRowSet_r **pRows
);
/*****************/
/* Function 0x05 */
MAPISTATUS NspiGetMatches(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in,out] STAT *pStat,
[in][unique] SPropTagArray *pReserved,
[in] uint32 Reserved2,
[in][unique] Restriction_r *Filter,
[in][unique] PropertyName_r *lpPropName,
[in] uint32 ulRequested,
[out] PropertyTagArray_r **ppOutMIds,
[in][unique] SPropTagArray *pPropTags,
[out] PropertyRowSet_r **ppRows
);
/*****************/
/* Function 0x06 */
MAPISTATUS NspiResortRestriction(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in,out] STAT *pStat,
[in] PropertyTagArray_r *pInMIds,
[in,out] PropertyTagArray_r **ppMIds
);
/*****************/
/* Function 0x07 */
MAPISTATUS NspiDNToMId(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] StringsArray_r *pNames,
[out] PropertyTagArray_r **ppMIds
);
/*****************/
/* Function 0x08 */
MAPISTATUS NspiGetPropList(
[in] policy_handle *handle,
[in] uint32 dwFlags,
[in] uint32 dwMId,
[in] uint32 CodePage,
[out] SPropTagArray **ppPropTags
);
/*****************/
/* Function 0x09 */
MAPISTATUS NspiGetProps(
[in] policy_handle *handle,
[in] uint32 dwFlags,
[in] STAT *pStat,
[in,unique] SPropTagArray *pPropTags,
[out] PropertyRow_r **ppRows
);
/*****************/
/* Funcion 0xa */
MAPISTATUS NspiCompareMIds(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] STAT *pStat,
[in] uint32 MId1,
[in] uint32 MId2,
[out] uint32 *plResult
);
/*****************/
/* Function 0xb */
MAPISTATUS NspiModProps(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] STAT *pStat,
[in,unique] SPropTagArray *pPropTags,
[in] PropertyRow_r *pRow
);
/*****************/
/* Function 0x0c */
typedef [bitmap32bit] bitmap {
NspiAddressCreationTemplates = 0x00000002,
NspiUnicodeStrings = 0x00000004
} NspiGetSpecialTable_dwFlags;
MAPISTATUS NspiGetSpecialTable(
[in] policy_handle *handle,
[in] NspiGetSpecialTable_dwFlags dwFlags,
[in] STAT *pStat,
[in,out] uint32 *lpVersion,
[out] PropertyRowSet_r **ppRows
);
/*******************/
/* Function 0x0d */
typedef [bitmap32bit] bitmap {
TI_TEMPLATE = 0x00000001,
TI_SCRIPT = 0x00000004,
TI_EMT = 0x00000010,
TI_HELPFILE_NAME = 0x00000020,
TI_HELPFILE_CONTENTS = 0x00000040
} TI_dwFlags;
MAPISTATUS NspiGetTemplateInfo(
[in] policy_handle *handle,
[in] TI_dwFlags dwFlags,
[in] uint32 ulType,
[in,unique,string,charset(DOS)] uint8 *pDN,
[in] uint32 dwCodePage,
[in] uint32 dwLocaleID,
[out] PropertyRow_r **ppData
);
/*******************/
/* Function 0x0e */
MAPISTATUS NspiModLinkAtt(
[in] policy_handle *handle,
[in] uint32 dwFlags,
[in] MAPITAGS ulPropTag,
[in] uint32 MId,
[in] BinaryArray_r *lpEntryIds
);
/*************************************/
/* Function 0x0f: Not used on wire */
MAPISTATUS NspiDeleteEntries(
[in] policy_handle *Reserved1,
[in] uint32 Reserved2,
[in] uint32 Reserved3,
[in] BinaryArray_r *Reserved4
);
/*******************/
/* Function 0x10 */
typedef [bitmap32bit] bitmap {
NspiUnicodeProptypes = 0x80000000
} NspiQueryColumns_dwFlags;
MAPISTATUS NspiQueryColumns(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] NspiQueryColumns_dwFlags dwFlags,
[out] SPropTagArray **ppColumns
);
/*******************/
/* Function 0x11 */
MAPISTATUS NspiGetNamesFromIDs(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in,unique] FlatUID_r *lpGuid,
[in,unique] SPropTagArray *pPropTags,
[out] SPropTagArray **ppReturnedPropTags,
[out] PropertyNameSet_r **ppNames
);
/*******************/
/* Function 0x12 */
MAPISTATUS NspiGetIDsFromNames(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] uint32 dwFlags,
[in,range(0,100000)] uint32 cPropNames,
[in,size_is(cPropNames)] PropertyName_r **ppNames,
[out] SPropTagArray **ppPropTags
);
/*****************/
/* Function 0x13 */
MAPISTATUS NspiResolveNames(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] STAT *pStat,
[in,unique] SPropTagArray *pPropTags,
[in] StringsArray_r *paStr,
[out] PropertyTagArray_r **ppMIds,
[out] PropertyRowSet_r **ppRows
);
/*****************/
/* Function 0x14 */
MAPISTATUS NspiResolveNamesW(
[in] policy_handle *handle,
[in] uint32 Reserved,
[in] STAT *pStat,
[in,unique] SPropTagArray *pPropTags,
[in] StringsArrayW_r *paWStr,
[out] PropertyTagArray_r **ppMIds,
[out] PropertyRowSet_r **ppRows
);
}
[
uuid("a4f1db00-ca47-1067-b31f-00dd010662da"),
pointer_default(unique),
endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]","ncacn_ip_tcp:"),
authservice("exchangeMDB"),
//version(0.81),
version(5308416),
helpstring("Exchange 5.5 EMSMDB")
] interface exchange_emsmdb
{
/*****************/
/* Function 0x00 */
MAPISTATUS EcDoConnect(
[out] policy_handle *handle,
[in,string,charset(DOS)] uint8 szUserDN[],
[in] uint32 ulFlags,
[in] uint32 ulConMod,
[in] uint32 cbLimit,
[in] uint32 ulCpid,
[in] uint32 ulLcidString,
[in] uint32 ulLcidSort,
[in] uint32 ulIcxrLink,
[in] uint16 usFCanConvertCodePages,
[out] uint32 *pcmsPollsMax,
[out] uint32 *pcRetry,
[out] uint32 *pcmsRetryDelay,
[out] uint32 *picxr,
[out,ref,string,charset(DOS)]uint8 **szDNPrefix,
[out,ref,string,charset(DOS)]uint8 **szDisplayName,
[out] uint16 rgwServerVersion[3],
[in,out] uint16 rgwClientVersion[3],
[in,out] uint32 *pullTimeStamp
);
/*****************/
/* 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_ReloadCachedInformation = 0x10,
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_QueryPosition = 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_SaveChangesAttachment = 0x25,
op_MAPI_SetReceiveFolder = 0x26,
op_MAPI_GetReceiveFolder = 0x27,
op_MAPI_RegisterNotification = 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_CopyTo = 0x39,
op_MAPI_CopyToStream = 0x3a,
op_MAPI_CloneStream = 0x3b,
op_MAPI_GetPermissionsTable = 0x3e,
op_MAPI_GetRulesTable = 0x3f,
op_MAPI_ModifyPermissions = 0x40,
op_MAPI_ModifyRules = 0x41,
op_MAPI_GetOwningServers = 0x42,
op_MAPI_LongTermIdFromId = 0x43,
op_MAPI_IdFromLongTermId = 0x44,
op_MAPI_PublicFolderIsGhosted = 0x45,
op_MAPI_OpenEmbeddedMessage = 0x46,
op_MAPI_SetSpooler = 0x47,
op_MAPI_SpoolerLockMessage = 0x48,
op_MAPI_AddressTypes = 0x49,
op_MAPI_TransportSend = 0x4a,
op_MAPI_FastTransferSourceCopyMessages = 0x4b,
op_MAPI_FastTransferSourceCopyFolder = 0x4c,
op_MAPI_FastTransferSourceCopyTo = 0x4d,
op_MAPI_FastTransferSourceGetBuffer = 0x4e,
op_MAPI_FindRow = 0x4f,
op_MAPI_Progress = 0x50,
op_MAPI_TransportNewMail = 0x51,
op_MAPI_GetValidAttachments = 0x52,
op_MAPI_FastTransferDestConfigure = 0x53,
op_MAPI_FastTransferDestPutBuffer = 0x54,
op_MAPI_GetNamesFromIDs = 0x55,
op_MAPI_GetIDsFromNames = 0x56,
op_MAPI_UpdateDeferredActionMessages = 0x57,
op_MAPI_EmptyFolder = 0x58,
op_MAPI_ExpandRow = 0x59,
op_MAPI_CollapseRow = 0x5a,
op_MAPI_LockRegionStream = 0x5b,
op_MAPI_UnlockRegionStream = 0x5c,
op_MAPI_CommitStream = 0x5d,
op_MAPI_GetStreamSize = 0x5e,
op_MAPI_QueryNamedProperties = 0x5f,
op_MAPI_GetPerUserLongTermIds = 0x60,
op_MAPI_GetPerUserGuid = 0x61,
op_MAPI_ReadPerUserInformation = 0x63,
op_MAPI_WritePerUserInformation = 0x64,
op_MAPI_SetReadFlags = 0x66,
op_MAPI_CopyProperties = 0x67,
op_MAPI_GetReceiveFolderTable = 0x68,
op_MAPI_FastTransferSourceCopyProps = 0x69,
op_MAPI_GetCollapseState = 0x6b,
op_MAPI_SetCollapseState = 0x6c,
op_MAPI_GetTransportFolder = 0x6d,
op_MAPI_Pending = 0x6e,
op_MAPI_OptionsData = 0x6f,
op_MAPI_SyncConfigure = 0x70,
op_MAPI_SyncImportMessageChange = 0x72,
op_MAPI_SyncImportHierarchyChange = 0x73,
op_MAPI_SyncImportDeletes = 0x74,
op_MAPI_SyncUploadStateStreamBegin = 0x75,
op_MAPI_SyncUploadStateStreamContinue = 0x76,
op_MAPI_SyncUploadStateStreamEnd = 0x77,
op_MAPI_SyncImportMessageMove = 0x78,
op_MAPI_SetPropertiesNoReplicate = 0x79,
op_MAPI_DeletePropertiesNoReplicate = 0x7a,
op_MAPI_GetStoreState = 0x7b,
op_MAPI_SyncOpenCollector = 0x7e,
op_MAPI_GetLocalReplicaIds = 0x7f,
op_MAPI_SyncImportReadStateChanges = 0x80,
op_MAPI_ResetTable = 0x81,
op_MAPI_SyncGetTransferState = 0x82,
op_MAPI_SyncOpenAdvisor = 0x83,
op_MAPI_TellVersion = 0x86,
op_MAPI_OpenPublicFolderByName = 0x87,
op_MAPI_SetSyncNotificationGuid = 0x88,
op_MAPI_FreeBookmark = 0x89,
op_MAPI_WriteAndCommitStream = 0x90,
op_MAPI_HardDeleteMessages = 0x91,
op_MAPI_HardDeleteMessagesAndSubfolders = 0x92,
op_MAPI_SetLocalReplicaMidsetDeleted = 0x93,
op_MAPI_Backoff = 0xf9,
op_MAPI_Logon = 0xfe,
op_MAPI_BufferTooSmall = 0xff,
/****** custom MAPI opnum for mapiproxy ******/
op_MAPI_proxypack = 0xa5
} MAPI_OPNUM;
typedef [public,noprint,flag(NDR_NOALIGN)] struct {
uint16 cb;
[flag(NDR_BUFFERS)]uint8 lpb[cb];
} SBinary_short;
typedef [public] struct {
uint32 cValues;
uint32 lpl[cValues];
} mapi_MV_LONG_STRUCT;