winewayland.drv: Implement vkGetPhysicalDeviceSurfaceSupportKHR.
[wine.git] / dlls / msvcp90 / msvcp90.h
blobb9359c33ff1714047ae3a71d8fb6169cb92a951d
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 "stdbool.h"
20 #include "stdlib.h"
21 #include "windef.h"
22 #include "winbase.h"
23 #include "cxx.h"
25 #define CXX_EXCEPTION 0xe06d7363
26 #define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
28 #if _MSVCP_VER >= 100
29 typedef __int64 DECLSPEC_ALIGN(8) streamoff;
30 typedef __int64 DECLSPEC_ALIGN(8) streamsize;
31 #else
32 typedef SSIZE_T streamoff;
33 typedef SSIZE_T streamsize;
34 #endif
36 void __cdecl _invalid_parameter_noinfo(void);
37 BOOL __cdecl __uncaught_exception(void);
38 int __cdecl _callnewh(size_t);
40 void* __cdecl operator_new(size_t);
41 void __cdecl operator_delete(void*);
42 extern void* (__cdecl *MSVCRT_set_new_handler)(void*);
44 #if _MSVCP_VER >= 110
45 /* keep in sync with msvcrt/lock.c */
46 typedef struct cs_queue
48 void *ctx;
49 struct cs_queue *next;
50 LONG free;
51 int unknown;
52 } cs_queue;
54 typedef struct
56 cs_queue unk_active;
57 void *unknown[2];
58 cs_queue *head;
59 void *tail;
60 } critical_section;
62 typedef union
64 critical_section conc;
65 SRWLOCK win;
66 } cs;
68 typedef struct cv_queue {
69 struct cv_queue *next;
70 LONG expired;
71 } cv_queue;
73 typedef struct {
74 /* cv_queue structure is not binary compatible */
75 cv_queue *queue;
76 critical_section lock;
77 } _Condition_variable;
79 typedef union
81 _Condition_variable conc;
82 CONDITION_VARIABLE win;
83 } cv;
85 extern void cs_init(cs*);
86 extern void cs_destroy(cs*);
87 extern void cs_lock(cs*);
88 extern void cs_unlock(cs*);
89 extern bool cs_trylock(cs*);
91 extern void cv_init(cv*);
92 extern void cv_destroy(cv*);
93 extern void cv_wait(cv*, cs*);
94 extern bool cv_wait_for(cv*, cs*, unsigned int);
95 extern void cv_notify_one(cv*);
96 extern void cv_notify_all(cv*);
97 #endif
99 #if _MSVCP_VER >= 100
100 extern bool (__cdecl *Context_IsCurrentTaskCollectionCanceling)(void);
101 #endif
103 /* basic_string<char, char_traits<char>, allocator<char>> */
104 typedef struct
106 #if _MSVCP_VER <= 90
107 void *allocator;
108 #endif
109 union {
110 #if _MSVCP_VER >= 70
111 #define BUF_SIZE_CHAR 16
112 char buf[BUF_SIZE_CHAR];
113 #endif
114 char *ptr;
115 } data;
116 size_t size;
117 size_t res;
118 #if _MSVCP_VER == 100
119 char allocator;
120 #endif
121 } basic_string_char;
123 basic_string_char* __thiscall MSVCP_basic_string_char_ctor(basic_string_char*);
124 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr(basic_string_char*, const char*);
125 basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(basic_string_char*, const char*, size_t);
126 basic_string_char* __thiscall MSVCP_basic_string_char_copy_ctor(basic_string_char*, const basic_string_char*);
127 void* __thiscall MSVCP_basic_string_char_dtor(basic_string_char*);
128 const char* __thiscall MSVCP_basic_string_char_c_str(const basic_string_char*);
129 void __thiscall MSVCP_basic_string_char_clear(basic_string_char*);
130 basic_string_char* __thiscall MSVCP_basic_string_char_append_ch(basic_string_char*, char);
131 size_t __thiscall MSVCP_basic_string_char_length(const basic_string_char*);
132 basic_string_char* __thiscall MSVCP_basic_string_char_assign(basic_string_char*, const basic_string_char*);
134 typedef struct
136 #if _MSVCP_VER <= 90
137 void *allocator;
138 #endif
139 union {
140 #if _MSVCP_VER >= 70
141 #define BUF_SIZE_WCHAR 8
142 wchar_t buf[BUF_SIZE_WCHAR];
143 #endif
144 wchar_t *ptr;
145 } data;
146 size_t size;
147 size_t res;
148 #if _MSVCP_VER == 100
149 char allocator;
150 #endif
151 } basic_string_wchar;
153 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor(basic_string_wchar*);
154 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr(basic_string_wchar*, const wchar_t*);
155 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(basic_string_wchar*, const wchar_t*, size_t);
156 void* __thiscall MSVCP_basic_string_wchar_dtor(basic_string_wchar*);
157 const wchar_t* __thiscall MSVCP_basic_string_wchar_c_str(const basic_string_wchar*);
158 void __thiscall MSVCP_basic_string_wchar_clear(basic_string_wchar*);
159 basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_ch(basic_string_wchar*, wchar_t);
160 size_t __thiscall MSVCP_basic_string_wchar_length(const basic_string_wchar*);
162 char* __thiscall MSVCP_allocator_char_allocate(void*, size_t);
163 void __thiscall MSVCP_allocator_char_deallocate(void*, char*, size_t);
164 size_t __thiscall MSVCP_allocator_char_max_size(const void*);
165 wchar_t* __thiscall MSVCP_allocator_wchar_allocate(void*, size_t);
166 void __thiscall MSVCP_allocator_wchar_deallocate(void*, wchar_t*, size_t);
167 size_t __thiscall MSVCP_allocator_wchar_max_size(const void*);
169 typedef struct
171 char *str;
172 char null_str;
173 } _Yarn_char;
175 _Yarn_char* __thiscall _Yarn_char_ctor(_Yarn_char*);
176 _Yarn_char* __thiscall _Yarn_char_ctor_cstr(_Yarn_char*, const char*);
177 _Yarn_char* __thiscall _Yarn_char_copy_ctor(_Yarn_char*, const _Yarn_char*);
178 const char* __thiscall _Yarn_char_c_str(const _Yarn_char*);
179 void __thiscall _Yarn_char_dtor(_Yarn_char*);
180 _Yarn_char* __thiscall _Yarn_char_op_assign(_Yarn_char*, const _Yarn_char*);
182 typedef struct
184 wchar_t *str;
185 wchar_t null_str;
186 } _Yarn_wchar;
188 _Yarn_wchar* __thiscall _Yarn_wchar_ctor(_Yarn_wchar*);
189 const wchar_t* __thiscall _Yarn_wchar__C_str(const _Yarn_wchar*);
190 void __thiscall _Yarn_wchar_dtor(_Yarn_wchar*);
191 _Yarn_wchar* __thiscall _Yarn_wchar_op_assign_cstr(_Yarn_wchar*, const wchar_t*);
193 /* class locale::facet */
194 typedef struct {
195 const vtable_ptr *vtable;
196 size_t refs;
197 } locale_facet;
199 typedef enum {
200 CODECVT_ok = 0,
201 CODECVT_partial = 1,
202 CODECVT_error = 2,
203 CODECVT_noconv = 3
204 } codecvt_base_result;
206 typedef struct {
207 #if _MSVCP_VER < 110
208 LCID handle;
209 #endif
210 unsigned page;
211 const short *table;
212 int delfl;
213 #if _MSVCP_VER >= 110
214 wchar_t *name;
215 #endif
216 } _Ctypevec;
218 #if _MSVCP_VER >= 140
219 typedef struct {
220 int wchar;
221 unsigned short byte, state;
222 } _Mbstatet;
223 #define MBSTATET_TO_INT(state) ((state)->wchar)
224 #else
225 typedef int _Mbstatet;
226 #define MBSTATET_TO_INT(state) (*(state))
227 #endif
229 /* class codecvt_base */
230 typedef struct {
231 locale_facet facet;
232 } codecvt_base;
234 /* class codecvt<char> */
235 typedef struct {
236 codecvt_base base;
237 } codecvt_char;
239 #if _MSVCP_VER >= 140
240 typedef enum convert_mode
242 consume_header = 4,
243 generate_header = 2,
244 little_endian = 1
245 } codecvt_convert_mode;
247 /* class codecvt<char32> */
248 typedef struct {
249 codecvt_base base;
250 } codecvt_char32;
251 #endif
253 bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
254 int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
255 int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
256 const char*, const char**, char*, char*, char**);
257 int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
258 const char*, const char**, char*, char*, char**);
259 int __thiscall codecvt_base_max_length(const codecvt_base*);
261 typedef struct {
262 #if _MSVCP_VER < 110
263 LCID handle;
264 #endif
265 unsigned page;
266 #if _MSVCP_VER >= 110
267 int mb_max;
268 int unk;
269 BYTE isleadbyte[32];
270 #endif
271 } _Cvtvec;
273 /* class codecvt<wchar> */
274 typedef struct {
275 codecvt_base base;
276 _Cvtvec cvt;
277 } codecvt_wchar;
279 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
280 int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
281 const wchar_t*, const wchar_t**, char*, char*, char**);
282 int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
283 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
285 /* class ctype_base */
286 typedef struct {
287 locale_facet facet;
288 } ctype_base;
290 /* class ctype<char> */
291 typedef struct {
292 ctype_base base;
293 _Ctypevec ctype;
294 } ctype_char;
296 bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
297 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
298 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
300 /* class ctype<wchar> */
301 typedef struct {
302 ctype_base base;
303 _Ctypevec ctype;
304 _Cvtvec cvt;
305 } ctype_wchar;
307 bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
308 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
309 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
311 /* class locale */
312 typedef struct
314 #if _MSVCP_VER >= 140
315 int unused;
316 #endif
317 struct _locale__Locimp *ptr;
318 } locale;
320 locale* __thiscall locale_ctor(locale*);
321 locale* __thiscall locale_copy_ctor(locale*, const locale*);
322 locale* __thiscall locale_operator_assign(locale*, const locale*);
323 void __thiscall locale_dtor(locale*);
324 void free_locale(void);
325 codecvt_char* codecvt_char_use_facet(const locale*);
326 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
327 codecvt_wchar* codecvt_short_use_facet(const locale*);
328 ctype_char* ctype_char_use_facet(const locale*);
329 ctype_wchar* ctype_wchar_use_facet(const locale*);
330 ctype_wchar* ctype_short_use_facet(const locale*);
332 /* class _Init_locks */
333 typedef struct {
334 char empty_struct;
335 } _Init_locks;
337 void __cdecl _Init_locks__Init_locks_ctor(_Init_locks*);
338 void __cdecl _Init_locks__Init_locks_dtor(_Init_locks*);
340 /* class _Lockit */
341 typedef struct {
342 #if _MSVCP_VER >= 70
343 int locktype;
344 #else
345 char empty_struct;
346 #endif
347 } _Lockit;
349 #define _LOCK_LOCALE 0
350 #define _LOCK_MALLOC 1
351 #define _LOCK_STREAM 2
352 #define _LOCK_DEBUG 3
353 #define _MAX_LOCK 4
355 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
356 void __thiscall _Lockit_dtor(_Lockit*);
358 /* class mutex */
359 typedef struct {
360 void *mutex;
361 } mutex;
363 mutex* __thiscall mutex_ctor(mutex*);
364 void __thiscall mutex_dtor(mutex*);
365 void __thiscall mutex_lock(mutex*);
366 void __thiscall mutex_unlock(mutex*);
368 typedef enum {
369 FMTFLAG_skipws = 0x0001,
370 FMTFLAG_unitbuf = 0x0002,
371 FMTFLAG_uppercase = 0x0004,
372 FMTFLAG_showbase = 0x0008,
373 FMTFLAG_showpoint = 0x0010,
374 FMTFLAG_showpos = 0x0020,
375 FMTFLAG_left = 0x0040,
376 FMTFLAG_right = 0x0080,
377 FMTFLAG_internal = 0x0100,
378 FMTFLAG_dec = 0x0200,
379 FMTFLAG_oct = 0x0400,
380 FMTFLAG_hex = 0x0800,
381 FMTFLAG_scientific = 0x1000,
382 FMTFLAG_fixed = 0x2000,
383 FMTFLAG_hexfloat = 0x3000,
384 FMTFLAG_boolalpha = 0x4000,
385 FMTFLAG_stdio = 0x8000,
386 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
387 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
388 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
389 FMTFLAG_mask = 0xffff
390 } IOSB_fmtflags;
392 typedef enum {
393 OPENMODE_in = 0x01,
394 OPENMODE_out = 0x02,
395 OPENMODE_ate = 0x04,
396 OPENMODE_app = 0x08,
397 OPENMODE_trunc = 0x10,
398 OPENMODE__Nocreate = 0x40,
399 OPENMODE__Noreplace = 0x80,
400 OPENMODE_binary = 0x20,
401 OPENMODE_mask = 0xff
402 } IOSB_openmode;
404 typedef enum {
405 SEEKDIR_beg = 0x0,
406 SEEKDIR_cur = 0x1,
407 SEEKDIR_end = 0x2,
408 SEEKDIR_mask = 0x3
409 } IOSB_seekdir;
411 typedef enum {
412 IOSTATE_goodbit = 0x00,
413 IOSTATE_eofbit = 0x01,
414 IOSTATE_failbit = 0x02,
415 IOSTATE_badbit = 0x04,
416 IOSTATE__Hardfail = 0x10,
417 IOSTATE_mask = 0x17
418 } IOSB_iostate;
420 typedef struct _iosarray {
421 struct _iosarray *next;
422 int index;
423 LONG long_val;
424 void *ptr_val;
425 } IOS_BASE_iosarray;
427 typedef enum {
428 EVENT_erase_event,
429 EVENT_imbue_event,
430 EVENT_copyfmt_event
431 } IOS_BASE_event;
433 struct _ios_base;
434 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
435 typedef struct _fnarray {
436 struct _fnarray *next;
437 int index;
438 IOS_BASE_event_callback event_handler;
439 } IOS_BASE_fnarray;
441 /* class ios_base */
442 typedef struct _ios_base {
443 const vtable_ptr *vtable;
444 #if _MSVCP_VER >= 100
445 size_t DECLSPEC_ALIGN(8) stdstr;
446 #elif _MSVCP_VER >= 71
447 size_t stdstr;
448 #endif
449 IOSB_iostate state;
450 IOSB_iostate except;
451 IOSB_fmtflags fmtfl;
452 streamsize prec;
453 streamsize wide;
454 IOS_BASE_iosarray *arr;
455 IOS_BASE_fnarray *calls;
456 #if _MSVCP_VER < 70
457 locale loc;
458 #else
459 locale *loc;
460 #endif
461 #if _MSVCP_VER <= 70
462 size_t stdstr;
463 #endif
464 } ios_base;
466 /* class basic_streambuf<char> */
467 typedef struct {
468 const vtable_ptr *vtable;
469 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
470 mutex lock;
471 #endif
472 char *rbuf;
473 char *wbuf;
474 char **prbuf;
475 char **pwbuf;
476 char *rpos;
477 char *wpos;
478 char **prpos;
479 char **pwpos;
480 int rsize;
481 int wsize;
482 int *prsize;
483 int *pwsize;
484 #if _MSVCP_VER < 70
485 locale loc;
486 #else
487 locale *loc;
488 #endif
489 } basic_streambuf_char;
491 typedef struct {
492 basic_streambuf_char *strbuf;
493 bool got;
494 char val;
495 } istreambuf_iterator_char;
497 typedef struct {
498 #if _MSVCP_VER == 80
499 void *iter_container;
500 #endif
501 bool failed;
502 basic_streambuf_char *strbuf;
503 } ostreambuf_iterator_char;
505 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
506 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
507 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
509 /* class basic_streambuf<wchar> */
510 typedef struct {
511 const vtable_ptr *vtable;
512 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
513 mutex lock;
514 #endif
515 wchar_t *rbuf;
516 wchar_t *wbuf;
517 wchar_t **prbuf;
518 wchar_t **pwbuf;
519 wchar_t *rpos;
520 wchar_t *wpos;
521 wchar_t **prpos;
522 wchar_t **pwpos;
523 int rsize;
524 int wsize;
525 int *prsize;
526 int *pwsize;
527 #if _MSVCP_VER < 70
528 locale loc;
529 #else
530 locale *loc;
531 #endif
532 } basic_streambuf_wchar;
534 typedef struct {
535 basic_streambuf_wchar *strbuf;
536 bool got;
537 wchar_t val;
538 } istreambuf_iterator_wchar;
540 typedef struct {
541 #if _MSVCP_VER == 80
542 void *iter_container;
543 #endif
544 bool failed;
545 basic_streambuf_wchar *strbuf;
546 } ostreambuf_iterator_wchar;
548 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
549 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
550 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
552 #if _MSVCP_VER < 70
553 #define IOS_LOCALE(ios) (&(ios)->loc)
554 #else
555 #define IOS_LOCALE(ios) ((ios)->loc)
556 #endif
558 /* class num_get<char> */
559 typedef struct {
560 locale_facet facet;
561 #if _MSVCP_VER <= 100
562 _Cvtvec cvt;
563 #endif
564 } num_get;
566 num_get* num_get_char_use_facet(const locale*);
567 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
568 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
569 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
570 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
571 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
572 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
573 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
574 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
575 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
576 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
577 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
578 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
579 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
580 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
581 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
582 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
583 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
584 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
585 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
586 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
587 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
588 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, bool*);
590 num_get* num_get_wchar_use_facet(const locale*);
591 num_get* num_get_short_use_facet(const locale*);
592 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
593 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
594 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
595 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
596 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
597 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
598 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
599 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
600 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
601 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
602 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
603 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
604 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
605 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
606 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
607 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
608 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
609 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
610 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
611 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
612 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
613 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, bool*);
615 /* class num_put<char> */
616 /* class num_put<wchar> */
617 typedef struct {
618 locale_facet facet;
619 #if _MSVCP_VER < 110
620 _Cvtvec cvt;
621 #endif
622 } num_put;
624 num_put* num_put_char_use_facet(const locale*);
625 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
626 ostreambuf_iterator_char, ios_base*, char, LONG);
627 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
628 ostreambuf_iterator_char, ios_base*, char, ULONG);
629 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
630 ostreambuf_iterator_char, ios_base*, char, double);
631 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
632 ostreambuf_iterator_char, ios_base*, char, double);
633 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
634 ostreambuf_iterator_char, ios_base*, char, const void*);
635 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
636 ostreambuf_iterator_char, ios_base*, char, __int64);
637 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
638 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
639 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
640 ostreambuf_iterator_char, ios_base*, char, bool);
642 num_put* num_put_wchar_use_facet(const locale*);
643 num_put* num_put_short_use_facet(const locale*);
644 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
645 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
646 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
647 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
648 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
649 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
650 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
651 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
652 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
653 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
654 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
655 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
656 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
657 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
658 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
659 ostreambuf_iterator_wchar, ios_base*, wchar_t, bool);
661 void init_exception(void*);
662 void init_locale(void*);
663 void init_io(void*);
664 void free_io(void);
666 #if _MSVCP_VER >= 100
667 void init_concurrency_details(void*);
668 void init_misc(void*);
669 void free_misc(void);
670 #endif
672 /* class complex<float> */
673 typedef struct {
674 float real;
675 float imag;
676 } complex_float;
678 /* class complex<double> */
679 /* class complex<long double> */
680 typedef struct {
681 double real;
682 double imag;
683 } complex_double;
685 #if _MSVCP_VER >= 100
686 typedef struct {
687 const vtable_ptr *vtable;
688 } error_category;
690 const error_category* __cdecl std_iostream_category(void);
691 const error_category* __cdecl std_generic_category(void);
693 typedef struct
695 int code;
696 const error_category *category;
697 } error_code;
698 #endif
700 #if _MSVCP_VER < 80
701 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
703 memcpy( dst, src, count );
704 return 0;
706 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
708 memmove( dst, src, count );
709 return 0;
711 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
713 mbstowcs( wcs, mbs, count );
714 return 0;
716 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
717 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
718 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
719 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
720 #endif
722 void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
723 void __cdecl DECLSPEC_NORETURN _Xinvalid_argument(const char*);
724 void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
725 void __cdecl DECLSPEC_NORETURN _Xmem(void);
726 void __cdecl DECLSPEC_NORETURN _Xout_of_range(const char*);
727 void __cdecl DECLSPEC_NORETURN _Xruntime_error(const char*);
728 void DECLSPEC_NORETURN throw_exception(const char*);
729 void DECLSPEC_NORETURN throw_failure(const char*);
730 void DECLSPEC_NORETURN throw_range_error(const char*);