summaryrefslogtreecommitdiffstats
path: root/private/ole32/stg/drt/drt.hxx
blob: 2a3bcee4c80a28552fc9b68e27f069ec5e8b003f (plain) (blame)
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
//+--------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1992.
//
//  File:	drt.hxx
//
//  Contents:	DRT header
//
//  History:	22-Sep-92	DrewB	Created
//
//---------------------------------------------------------------

#ifndef __DRT_HXX__
#define __DRT_HXX__

#include <dfmsp.hxx>

// Exit codes
#define EXIT_BADSC 1
#define EXIT_OOM 2
#define EXIT_UNKNOWN 3

#define STR(x) OLESTR(x)

#ifdef UNICODE
#ifndef ATOT
#define ATOT(psz, ptcs, max) mbstowcs(ptcs, psz, max)
#endif
#ifndef TTOA
#define TTOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
#endif
#else
#ifndef ATOT
#define ATOT(psz, ptcs) strcpy(ptcs, psz)
#endif
#ifndef TTOA
#define TTOA(ptcs, psz) strcpy(psz, ptcs)
#endif
#endif

#ifdef OLEWIDECHAR

//typedef WCHAR TCHAR;

#ifndef ATOOLE
#define ATOOLE(psz, ptcs, max) mbstowcs(ptcs, psz, max)
#endif
#ifndef OLETOA
i#define OLETOA(ptcs, psz, max) wcstombs(psz, ptcs, max)
#endif

#ifndef olecscmp
#define olecscmp wcscmp
#endif
#ifndef olecscpy
#define olecscpy wcscpy
#endif
#ifndef olecslen
#define olecslen wcslen
#endif
#ifndef olecsprintf
#define olecsprintf swprintf
#endif

#else

typedef char TCHAR;

#ifndef ATOOLE
#define ATOOLE(psz, ptcs) strcpy(ptcs, psz)
#endif
#ifndef OLETOA
#define OLETOA(ptcs, psz) strcpy(psz, ptcs)
#endif

#ifndef olecscmp
#define olecscmp strcmp
#endif
#ifndef olecscpy
#define olecscpy strcpy
#endif
#ifndef olecslen
#define olecslen strlen
#endif
#ifndef olecsprintf
#define olecsprintf sprintf
#endif

#endif

#define DRTDF atcDrtDocfile
#define MARSHALDF STR("dup.dfl")

#define ROOTP(x) ((x) | dwTransacted | dwRootDenyWrite)
#define STGP(x) ((x) | dwTransacted | STGM_SHARE_EXCLUSIVE)
#define STMP(x) ((x) | STGM_SHARE_EXCLUSIVE)

extern DWORD dwTransacted, dwRootDenyWrite;
extern BOOL fVerbose;
extern OLECHAR atcDrtDocfile[];

#endif // #ifndef __DRT_HXX__