netapi32: Add support for info level 20 in NetUserEnum.
[wine.git] / dlls / msvcp60 / msvcp.h
blobccb595096124f3eab034538c11c4d4922027a525
1 /*
2 * Copyright 2010 Piotr Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "stdlib.h"
20 #include "windef.h"
21 #include "cxx.h"
23 typedef unsigned char MSVCP_bool;
24 typedef SIZE_T MSVCP_size_t;
25 typedef SSIZE_T streamoff;
26 typedef SSIZE_T streamsize;
27 #define STREAMOFF_BITS 32
28 #define STREAMSIZE_BITS 32
30 void __cdecl _invalid_parameter(const wchar_t*, const wchar_t*,
31 const wchar_t*, unsigned int, uintptr_t);
32 BOOL __cdecl __uncaught_exception(void);
34 extern void* (__cdecl *MSVCRT_operator_new)(MSVCP_size_t);
35 extern void (__cdecl *MSVCRT_operator_delete)(void*);
37 /* basic_string<char, char_traits<char>, allocator<char>> */
38 typedef struct
40 void *allocator;
41 char *ptr;
42 MSVCP_size_t size;
43 MSVCP_size_t res;
44 } basic_string_char;
46 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
47 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
48 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, MSVCP_size_t);
49 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
50 void __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
51 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
52 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
53 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
54 MSVCP_size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
55 basic_string_char* __thiscall MSVCP_basic_string_char_append_len_ch(basic_string_char*, MSVCP_size_t, char);
56 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
58 typedef struct
60 void *allocator;
61 wchar_t *ptr;
62 MSVCP_size_t size;
63 MSVCP_size_t res;
64 } basic_string_wchar;
66 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
67 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
68 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, MSVCP_size_t);
69 void __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
70 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
71 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
72 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
73 MSVCP_size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
75 char* __thiscall MSVCP_allocator_char_allocate(void*, MSVCP_size_t);
76 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, MSVCP_size_t);
77 MSVCP_size_t __thiscall MSVCP_allocator_char_max_size(const void*);
78 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, MSVCP_size_t);
79 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, MSVCP_size_t);
80 MSVCP_size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
82 /* class locale::facet */
83 typedef struct {
84 const vtable_ptr *vtable;
85 MSVCP_size_t refs;
86 } locale_facet;
88 typedef enum {
89 CODECVT_ok = 0,
90 CODECVT_partial = 1,
91 CODECVT_error = 2,
92 CODECVT_noconv = 3
93 } codecvt_base_result;
95 typedef struct {
96 LCID handle;
97 unsigned page;
98 const short *table;
99 int delfl;
100 } _Ctypevec;
102 /* class codecvt_base */
103 typedef struct {
104 locale_facet facet;
105 } codecvt_base;
107 /* class codecvt<char> */
108 typedef struct {
109 codecvt_base base;
110 } codecvt_char;
112 MSVCP_bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
113 int __thiscall codecvt_char_out(const codecvt_char*, int*, const char*,
114 const char*, const char**, char*, char*, char**);
115 int __thiscall codecvt_char_in(const codecvt_char*, int*, const char*,
116 const char*, const char**, char*, char*, char**);
117 int __thiscall codecvt_base_max_length(const codecvt_base*);
119 typedef struct {
120 LCID handle;
121 unsigned page;
122 } _Cvtvec;
124 /* class codecvt<wchar> */
125 typedef struct {
126 codecvt_base base;
127 _Cvtvec cvt;
128 } codecvt_wchar;
130 int __thiscall codecvt_wchar_out(const codecvt_wchar*, int*, const wchar_t*,
131 const wchar_t*, const wchar_t**, char*, char*, char**);
132 int __thiscall codecvt_wchar_in(const codecvt_wchar*, int*, const char*,
133 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
135 /* class ctype_base */
136 typedef struct {
137 locale_facet facet;
138 } ctype_base;
140 /* class ctype<char> */
141 typedef struct {
142 ctype_base base;
143 _Ctypevec ctype;
144 } ctype_char;
146 MSVCP_bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
147 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
148 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
150 /* class ctype<wchar> */
151 typedef struct {
152 ctype_base base;
153 _Ctypevec ctype;
154 _Cvtvec cvt;
155 } ctype_wchar;
157 MSVCP_bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
158 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
159 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
161 /* class locale */
162 typedef struct
164 struct _locale__Locimp *ptr;
165 } locale;
167 locale* __thiscall locale_ctor(locale*);
168 locale* __thiscall locale_copy_ctor(locale*, const locale*);
169 locale* __thiscall locale_ctor_uninitialized(locale *, int);
170 locale* __thiscall locale_operator_assign(locale*, const locale*);
171 void __thiscall locale_dtor(locale*);
172 void free_locale(void);
173 locale* __thiscall locale__Addfac(locale*, locale_facet*, MSVCP_size_t, MSVCP_size_t);
174 codecvt_char* codecvt_char_use_facet(const locale*);
175 codecvt_wchar* codecvt_short_use_facet(const locale*);
176 ctype_char* ctype_char_use_facet(const locale*);
177 ctype_wchar* ctype_wchar_use_facet(const locale*);
178 ctype_wchar* ctype_short_use_facet(const locale*);
180 typedef struct {
181 MSVCP_size_t id;
182 } locale_id;
183 extern locale_id codecvt_char_id;
184 extern locale_id codecvt_short_id;
186 /* class _Lockit */
187 typedef struct {
188 char empty_struct;
189 } _Lockit;
191 #define _LOCK_LOCALE 0
192 #define _LOCK_MALLOC 1
193 #define _LOCK_STREAM 2
194 #define _LOCK_DEBUG 3
195 #define _MAX_LOCK 4
197 void init_lockit(void);
198 void free_lockit(void);
199 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
200 void __thiscall _Lockit_dtor(_Lockit*);
202 typedef enum {
203 FMTFLAG_skipws = 0x0001,
204 FMTFLAG_unitbuf = 0x0002,
205 FMTFLAG_uppercase = 0x0004,
206 FMTFLAG_showbase = 0x0008,
207 FMTFLAG_showpoint = 0x0010,
208 FMTFLAG_showpos = 0x0020,
209 FMTFLAG_left = 0x0040,
210 FMTFLAG_right = 0x0080,
211 FMTFLAG_internal = 0x0100,
212 FMTFLAG_dec = 0x0200,
213 FMTFLAG_oct = 0x0400,
214 FMTFLAG_hex = 0x0800,
215 FMTFLAG_scientific = 0x1000,
216 FMTFLAG_fixed = 0x2000,
217 FMTFLAG_hexfloat = 0x3000,
218 FMTFLAG_boolalpha = 0x4000,
219 FMTFLAG_stdio = 0x8000,
220 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
221 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
222 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
223 FMTFLAG_mask = 0xffff
224 } IOSB_fmtflags;
226 typedef enum {
227 OPENMODE_in = 0x01,
228 OPENMODE_out = 0x02,
229 OPENMODE_ate = 0x04,
230 OPENMODE_app = 0x08,
231 OPENMODE_trunc = 0x10,
232 OPENMODE__Nocreate = 0x40,
233 OPENMODE__Noreplace = 0x80,
234 OPENMODE_binary = 0x20,
235 OPENMODE_mask = 0xff
236 } IOSB_openmode;
238 typedef enum {
239 SEEKDIR_beg = 0x0,
240 SEEKDIR_cur = 0x1,
241 SEEKDIR_end = 0x2,
242 SEEKDIR_mask = 0x3
243 } IOSB_seekdir;
245 typedef enum {
246 IOSTATE_goodbit = 0x00,
247 IOSTATE_eofbit = 0x01,
248 IOSTATE_failbit = 0x02,
249 IOSTATE_badbit = 0x04,
250 IOSTATE__Hardfail = 0x10,
251 IOSTATE_mask = 0x17
252 } IOSB_iostate;
254 typedef struct _iosarray {
255 struct _iosarray *next;
256 int index;
257 int long_val;
258 void *ptr_val;
259 } IOS_BASE_iosarray;
261 typedef enum {
262 EVENT_erase_event,
263 EVENT_imbue_event,
264 EVENT_copyfmt_event
265 } IOS_BASE_event;
267 struct _ios_base;
268 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
269 typedef struct _fnarray {
270 struct _fnarray *next;
271 int index;
272 IOS_BASE_event_callback event_handler;
273 } IOS_BASE_fnarray;
275 /* class ios_base */
276 typedef struct _ios_base {
277 const vtable_ptr *vtable;
278 IOSB_iostate state;
279 IOSB_iostate except;
280 IOSB_fmtflags fmtfl;
281 streamsize prec;
282 streamsize wide;
283 IOS_BASE_iosarray *arr;
284 IOS_BASE_fnarray *calls;
285 locale loc;
286 MSVCP_size_t stdstr;
287 } ios_base;
289 /* class basic_streambuf<char> */
290 typedef struct {
291 const vtable_ptr *vtable;
292 char *rbuf;
293 char *wbuf;
294 char **prbuf;
295 char **pwbuf;
296 char *rpos;
297 char *wpos;
298 char **prpos;
299 char **pwpos;
300 int rsize;
301 int wsize;
302 int *prsize;
303 int *pwsize;
304 locale loc;
305 } basic_streambuf_char;
307 typedef struct {
308 basic_streambuf_char *strbuf;
309 MSVCP_bool got;
310 char val;
311 } istreambuf_iterator_char;
313 typedef struct {
314 MSVCP_bool failed;
315 basic_streambuf_char *strbuf;
316 } ostreambuf_iterator_char;
318 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
319 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
320 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
322 /* class basic_streambuf<wchar> */
323 typedef struct {
324 const vtable_ptr *vtable;
325 wchar_t *rbuf;
326 wchar_t *wbuf;
327 wchar_t **prbuf;
328 wchar_t **pwbuf;
329 wchar_t *rpos;
330 wchar_t *wpos;
331 wchar_t **prpos;
332 wchar_t **pwpos;
333 int rsize;
334 int wsize;
335 int *prsize;
336 int *pwsize;
337 locale loc;
338 } basic_streambuf_wchar;
340 typedef struct {
341 basic_streambuf_wchar *strbuf;
342 MSVCP_bool got;
343 wchar_t val;
344 } istreambuf_iterator_wchar;
346 typedef struct {
347 MSVCP_bool failed;
348 basic_streambuf_wchar *strbuf;
349 } ostreambuf_iterator_wchar;
351 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
352 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
353 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
355 #define IOS_LOCALE(ios) (&(ios)->loc)
357 /* class num_get<char> */
358 typedef struct {
359 locale_facet facet;
360 _Cvtvec cvt;
361 } num_get;
363 num_get* num_get_char_use_facet(const locale*);
364 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
365 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
366 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
367 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
368 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
369 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
370 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
371 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
372 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
373 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
374 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
375 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
376 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
377 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
378 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
379 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
380 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
381 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
382 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
383 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
384 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
385 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, MSVCP_bool*);
387 num_get* num_get_short_use_facet(const locale*);
388 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
389 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
390 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
391 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
392 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
393 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
394 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
395 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
396 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
397 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
398 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
399 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
400 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
401 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
402 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
403 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
404 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
405 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
406 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
407 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
408 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
409 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, MSVCP_bool*);
411 /* class num_put<char> */
412 /* class num_put<wchar> */
413 typedef struct {
414 locale_facet facet;
415 _Cvtvec cvt;
416 } num_put;
418 num_put* num_put_char_use_facet(const locale*);
419 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
420 ostreambuf_iterator_char, ios_base*, char, LONG);
421 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
422 ostreambuf_iterator_char, ios_base*, char, ULONG);
423 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
424 ostreambuf_iterator_char, ios_base*, char, double);
425 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
426 ostreambuf_iterator_char, ios_base*, char, double);
427 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
428 ostreambuf_iterator_char, ios_base*, char, const void*);
429 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
430 ostreambuf_iterator_char, ios_base*, char, __int64);
431 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
432 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
433 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
434 ostreambuf_iterator_char, ios_base*, char, MSVCP_bool);
436 num_put* num_put_short_use_facet(const locale*);
437 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
438 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
439 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
440 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
441 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
442 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
443 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
444 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
445 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
446 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
447 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
448 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
449 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
450 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
451 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
452 ostreambuf_iterator_wchar, ios_base*, wchar_t, MSVCP_bool);
454 void init_exception(void*);
455 void init_locale(void*);
456 void init_io(void*);
457 void free_io(void);