summaryrefslogtreecommitdiffstats
path: root/private/nw/svcdlls/nwwks/inc/splutil.h
blob: 8e8169eacca8994a09a2bda9660033761441523f (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
/*++

Copyright (c) 1992-1993 Microsoft Corporation

Module Name:

    splutil.h    

Abstract:

    Header file for utilities used in Novell Print Provider

Author:

    Yi-Hsin Sung (yihsins) 12-Apr-1993

Revision History:

--*/

#ifndef _SPLUTIL_H_
#define _SPLUTIL_H_

#define offsetof(type, identifier) (DWORD)(&(((type)0)->identifier))

extern DWORD PrinterInfo1Offsets[];
extern DWORD PrinterInfo2Offsets[];
extern DWORD PrinterInfo3Offsets[];
extern DWORD JobInfo1Offsets[];
extern DWORD JobInfo2Offsets[];
extern DWORD AddJobInfo1Offsets[];

VOID
MarshallUpStructure(
   LPBYTE   lpStructure,
   LPDWORD  lpOffsets,
   LPBYTE   lpBufferStart
);

VOID
MarshallDownStructure(
   LPBYTE   lpStructure,
   LPDWORD  lpOffsets,
   LPBYTE   lpBufferStart
);

LPVOID
AllocNwSplMem(
    IN DWORD flags,
    IN DWORD cb
    );

VOID
FreeNwSplMem(
    IN LPVOID pMem,
    IN DWORD  cb
    );

LPWSTR
AllocNwSplStr(
    IN LPWSTR pStr
    );

VOID
FreeNwSplStr(
    IN LPWSTR pStr
);

BOOL
ValidateUNCName(
    IN LPWSTR pName
);

LPWSTR 
GetNextElement(
               OUT LPWSTR *pPtr, 
               IN  WCHAR token
);


#endif // _SPLUTIL_H