added some development tools
[windows-sources.git] / developer / VSSDK / VisualStudioIntegration / Common / Inc / office10 / msobp.h
blob5ee9f224fdf6ad44ecb394e2f804fef616d5ffd7
1 /*------------------------------------------------------------------------------------------
3 %%File: msobp.h
4 %%Contact: EricFox
6 MSO routines for bullet-proofing a document that might be corrupt. Sniffs out
7 corruption and tries to fix it.
9 ------------------------------------------------------------------------------------------*/
11 #pragma once
13 #ifndef MSOBP_H
14 #define MSOBP_H
17 typedef enum // number of stack levels for Resetting the BPL Error watcher
19 bprNil = -1,
20 bprMax = 4
21 } BPR;
24 typedef enum // BulletProofing Success Code
26 bpscNone = 0, // no problem
27 bpscFixed,
28 bpscNotFixed,
29 bpscOOM
30 } BPSC;
33 typedef int MSOBPLEK;
35 #define msobplekNil 0
36 #define msobplekPv 1
37 #define msobplekH 2
38 #define msobplekPl 3
39 #define msobplekPlc 4
40 #define msobplekSttb 5
41 #define msobplekPcd 6
42 #define msobplekBte 7
43 #define msobplekChp 8
44 #define msobplekPap 9
45 #define msobplekTableProps 10
46 #define msobplekTableChars 11
47 #define msobplekFieldChars 12
48 #define msobplekLists 13
49 #define msobplekStyles 14
50 #define msobplekOleFld 15
51 #define msobplekOleOcx 16
52 #define msobplekOleObjd 17
53 #define msobplekNumberedStyles 18
54 #define msobplekSections 19
55 #define msobplekFootnotes 20
56 #define msobplekEndnotes 21
57 #define msobplekComments 22
58 #define msobplekDrawnObjects 23
59 #define msobplekTextbox 24
60 #define msobplekFsr 25
61 #define msobplekRsl 26
62 #define msobplekUim 27
63 #define msobplekPictures 28
64 #define msobplekDivs 29
65 #define msobplekBookmarks 30
66 #define msobplekDataRecoveryOpen 31
67 #define msobplekEscher 32
68 #define msobplekPx 33
69 #define msobplekSumInfo 34
70 #define msobplekLinkedList 35
71 #define msobplekString 36
72 #define msobplekHyperlink 37
74 #define msobplekMax 38
77 typedef BPSC (*PFNBP)(struct _BPL *, void *, struct _SVI *);
78 typedef struct _MSOBPCB // MSO BulletProofing CallBack Block
80 // main BP logging routine
81 void (CALLBACK *pfnLogFixBple)(BPSC *pbsc, struct _BPL *pbpl, MSOBPLEK msobplek);
83 // BPR helper routines
84 BPR (CALLBACK *pfnBprResetBpl)(void *pbpl);
85 int (CALLBACK *pfnFSawErrorBpr)(void *pbpl, BPR bpr);
86 void (CALLBACK *pfnSawErrorBpl)(void *pbpl);
88 // actual error log
89 struct _BPL *pbpl;
90 } MSOBPCB;
93 // BPSC handling
94 MSOAPI_(void) MsoUpdateBpsc(BPSC *pbpsc, BPSC bpscNew);
96 // generic pointer routines
97 MSOAPI_(void) MsoSetStackLimits(void); // REVIEW: PETERO: Is this a real routine?
98 MSOAPI_(BOOL) MsoFTestCbPv(void *pv, int cb);
99 MSOAPI_(BOOL) MsoFTestCbPvRO(const void *pv, int cb);
100 MSOAPI_(int) MsoCbActualFromPv(void *pv, int cb);
101 MSOAPI_(BOOL) MsoFEnsureCbPv(void **ppv, int cb);
102 MSOAPI_(BOOL) MsoFTestH(void **ppv);
103 MSOAPI_(BOOL) MsoFTestWz(WCHAR *wz, int cwchMaxPossible);
104 MSOAPI_(BOOL) MsoFTestSz(char *sz, int cchMaxPossible);
105 MSOAPI_(BOOL) MsoFTestWt(WCHAR *wt);
106 MSOAPI_(BOOL) MsoFTestSt(char *st);
107 MSOAPI_(BOOL) MsoFTestWtz(WCHAR *wtz);
108 MSOAPI_(BOOL) MsoFTestStz(char *stz);
109 MSOAPI_(BPSC) MsoBpscBulletProofPx(void *pvPx, void *pmsobpcb, int cb);
110 MSOAPI_(BPSC) MsoBpscBulletProofLinkedList(MSOBPCB *pmsobpcb, BYTE **ppbHead, int cb, int bpNext, PFNBP pfnbp, struct _SVI *psvi);
112 #endif // !MSOBP_H