ReactOS  0.4.14-dev-614-gbfd8a84
mswhelper.h
Go to the documentation of this file.
1 #ifndef _MSWHELPER_H
2 #define _MSWHELPER_H
3 
4 #include <ws2spi.h>
5 
6 typedef struct {
10  BYTE* bufendptr; // Pointer to the first "unused" byte
11  BOOL bufok; // FALSE if on mswBuffer-Function fails
13 
14 void
16  _Out_ PMSW_BUFFER mswBuf,
17  _In_ BYTE* buffer,
18  _In_ DWORD bufferSize);
19 
20 BOOL
22  _Inout_ PMSW_BUFFER mswBuf,
23  _In_ DWORD count);
24 
25 BOOL
27  _Inout_ PMSW_BUFFER mswBuf,
28  _In_ DWORD count);
29 
30 BYTE*
32  _Inout_ PMSW_BUFFER mswBuf);
33 
34 BOOL
36  _Inout_ PMSW_BUFFER mswBuf,
37  _In_ void *dataToAppend,
39 
40 BOOL
42  _Inout_ PMSW_BUFFER mswBuf,
43  _In_ char* str);
44 
45 BOOL
47  _Inout_ PMSW_BUFFER mswBuf,
48  _In_ WCHAR* str);
49 
50 BOOL
52  _Inout_ PMSW_BUFFER mswBuf,
53  _In_ void* ptr);
54 
55 BOOL
57  _Inout_ PMSW_BUFFER mswBuf,
58  _In_ void **lst,
59  _In_ DWORD itemByteLength,
60  _In_opt_ int deltaofs);
61 
62 BOOL
64  _Inout_ PMSW_BUFFER mswBuf,
65  _In_ void **lst,
66  _In_opt_ int ptrofs);
67 
68 BOOL
70  _Inout_ PMSW_BUFFER mswBuf,
71  _Inout_ LPWSAQUERYSETW lpRes,
72  _In_ char** hostAliasesA,
73  _In_ char* hostnameA,
74  _In_ DWORD ip4addr);
75 
76 BOOL
78  _Inout_ PMSW_BUFFER mswBuf,
79  _Inout_ LPWSAQUERYSETW lpRes,
80  _In_ char* serviceNameA,
81  _In_ char** serviceAliasesA,
82  _In_ char* protocolNameA,
83  _In_ WORD port);
84 
85 BOOL
87  _Inout_ PMSW_BUFFER mswBuf,
88  _Inout_ LPWSAQUERYSETW lpRes,
89  _In_ DWORD ip4addr);
90 
91 WCHAR*
93  _In_opt_ HANDLE hHeap,
94  _In_ char* aStr);
95 
96 char*
98  _In_opt_ HANDLE hHeap,
99  _In_ WCHAR* wStr);
100 
101 WCHAR*
103  _In_opt_ HANDLE hHeap,
104  _In_ WCHAR* wStr);
105 
106 char*
108  _In_opt_ HANDLE hHeap,
109  _In_ char* aStr);
110 
111 /* strary:
112  ptr1 ... ptrn \0
113  data1 ... datan
114 */
115 char**
117  _In_opt_ HANDLE hHeap,
118  _In_ char** aStrAry);
119 
120 /* strary:
121  ptr1 ... ptrn \0
122  data1 ... datan
123 */
124 char**
126  _In_opt_ HANDLE hHeap,
127  _In_ WCHAR** aStrAry);
128 
129 #endif // _MSWHELPER_H
DWORD bytesMax
Definition: mswhelper.h:8
BOOL mswBufferAppendPtr(_Inout_ PMSW_BUFFER mswBuf, _In_ void *ptr)
Definition: mswhelper.c:86
BYTE * mswBufferEndPtr(_Inout_ PMSW_BUFFER mswBuf)
Definition: mswhelper.c:51
char ** StrAryCpyHeapAllocWToA(_In_opt_ HANDLE hHeap, _In_ WCHAR **aStrAry)
Definition: mswhelper.c:596
GLuint GLuint GLsizei count
Definition: gl.h:1545
static LPWSAQUERYSETW
Definition: sock.c:91
GLuint buffer
Definition: glext.h:5915
struct MSW_BUFFER * PMSW_BUFFER
BYTE * buffer
Definition: mswhelper.h:9
#define _In_opt_
Definition: no_sal2.h:213
char ** StrAryCpyHeapAllocA(_In_opt_ HANDLE hHeap, _In_ char **aStrAry)
Definition: mswhelper.c:530
char * StrW2AHeapAlloc(_In_opt_ HANDLE hHeap, _In_ WCHAR *wStr)
Definition: mswhelper.c:442
BOOL mswBufferAppendAddr_AddrInfoW(_Inout_ PMSW_BUFFER mswBuf, _Inout_ LPWSAQUERYSETW lpRes, _In_ DWORD ip4addr)
Definition: mswhelper.c:352
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
const WCHAR * str
BOOL mswBufferAppendStrA(_Inout_ PMSW_BUFFER mswBuf, _In_ char *str)
Definition: mswhelper.c:71
#define _Out_
Definition: no_sal2.h:323
BOOL mswBufferCheck(_Inout_ PMSW_BUFFER mswBuf, _In_ DWORD count)
Definition: mswhelper.c:28
WCHAR * StrA2WHeapAlloc(_In_opt_ HANDLE hHeap, _In_ char *aStr)
Definition: mswhelper.c:399
BOOL mswBufferAppend(_Inout_ PMSW_BUFFER mswBuf, _In_ void *dataToAppend, _In_ DWORD dataSize)
Definition: mswhelper.c:57
BOOL mswBufferAppendLst(_Inout_ PMSW_BUFFER mswBuf, _In_ void **lst, _In_ DWORD itemByteLength, _In_opt_ int deltaofs)
Definition: mswhelper.c:104
BOOL mswBufferAppendStrW(_Inout_ PMSW_BUFFER mswBuf, _In_ WCHAR *str)
Definition: mswhelper.c:78
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned short WORD
Definition: ntddk_ex.h:93
void mswBufferInit(_Out_ PMSW_BUFFER mswBuf, _In_ BYTE *buffer, _In_ DWORD bufferSize)
unsigned long DWORD
Definition: ntddk_ex.h:95
char * StrCpyHeapAllocA(_In_opt_ HANDLE hHeap, _In_ char *aStr)
Definition: mswhelper.c:507
#define _Inout_
Definition: no_sal2.h:244
BYTE * bufendptr
Definition: mswhelper.h:10
WCHAR * StrCpyHeapAllocW(_In_opt_ HANDLE hHeap, _In_ WCHAR *wStr)
Definition: mswhelper.c:484
unsigned char BYTE
Definition: mem.h:68
BOOL mswBufferAppendBlob_Hostent(_Inout_ PMSW_BUFFER mswBuf, _Inout_ LPWSAQUERYSETW lpRes, _In_ char **hostAliasesA, _In_ char *hostnameA, _In_ DWORD ip4addr)
Definition: mswhelper.c:227
#define _In_
Definition: no_sal2.h:204
BOOL mswBufferIncUsed(_Inout_ PMSW_BUFFER mswBuf, _In_ DWORD count)
Definition: mswhelper.c:39
GLenum GLsizei dataSize
Definition: glext.h:11123
BOOL mswBufferAppendBlob_Servent(_Inout_ PMSW_BUFFER mswBuf, _Inout_ LPWSAQUERYSETW lpRes, _In_ char *serviceNameA, _In_ char **serviceAliasesA, _In_ char *protocolNameA, _In_ WORD port)
Definition: mswhelper.c:294
BOOL bufok
Definition: mswhelper.h:11
BOOL mswBufferAppendStrLstA(_Inout_ PMSW_BUFFER mswBuf, _In_ void **lst, _In_opt_ int ptrofs)
Definition: mswhelper.c:160
DWORD bytesUsed
Definition: mswhelper.h:7
USHORT port
Definition: uri.c:228