winex11: Use NtUserBuildHwndList for has_owned_popup implementation.
[wine.git] / dlls / msvcp90 / msvcp90.h
blobb996ae84a46fc055b8941eb6de58e9e94ed40052
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 struct cs_queue *next;
49 BOOL free;
50 int unknown;
51 } cs_queue;
53 typedef struct
55 ULONG_PTR unk_thread_id;
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 bool __thiscall codecvt_base_always_noconv(const codecvt_base*);
240 int __thiscall codecvt_char_unshift(const codecvt_char*, _Mbstatet*, char*, char*, char**);
241 int __thiscall codecvt_char_out(const codecvt_char*, _Mbstatet*, const char*,
242 const char*, const char**, char*, char*, char**);
243 int __thiscall codecvt_char_in(const codecvt_char*, _Mbstatet*, const char*,
244 const char*, const char**, char*, char*, char**);
245 int __thiscall codecvt_base_max_length(const codecvt_base*);
247 typedef struct {
248 #if _MSVCP_VER < 110
249 LCID handle;
250 #endif
251 unsigned page;
252 #if _MSVCP_VER >= 110
253 int mb_max;
254 int unk;
255 BYTE isleadbyte[32];
256 #endif
257 } _Cvtvec;
259 /* class codecvt<wchar> */
260 typedef struct {
261 codecvt_base base;
262 _Cvtvec cvt;
263 } codecvt_wchar;
265 int __thiscall codecvt_wchar_unshift(const codecvt_wchar*, _Mbstatet*, char*, char*, char**);
266 int __thiscall codecvt_wchar_out(const codecvt_wchar*, _Mbstatet*, const wchar_t*,
267 const wchar_t*, const wchar_t**, char*, char*, char**);
268 int __thiscall codecvt_wchar_in(const codecvt_wchar*, _Mbstatet*, const char*,
269 const char*, const char**, wchar_t*, wchar_t*, wchar_t**);
271 /* class ctype_base */
272 typedef struct {
273 locale_facet facet;
274 } ctype_base;
276 /* class ctype<char> */
277 typedef struct {
278 ctype_base base;
279 _Ctypevec ctype;
280 } ctype_char;
282 bool __thiscall ctype_char_is_ch(const ctype_char*, short, char);
283 char __thiscall ctype_char_narrow_ch(const ctype_char*, char, char);
284 char __thiscall ctype_char_widen_ch(const ctype_char*, char);
286 /* class ctype<wchar> */
287 typedef struct {
288 ctype_base base;
289 _Ctypevec ctype;
290 _Cvtvec cvt;
291 } ctype_wchar;
293 bool __thiscall ctype_wchar_is_ch(const ctype_wchar*, short, wchar_t);
294 char __thiscall ctype_wchar_narrow_ch(const ctype_wchar*, wchar_t, char);
295 wchar_t __thiscall ctype_wchar_widen_ch(const ctype_wchar*, char);
297 /* class locale */
298 typedef struct
300 #if _MSVCP_VER >= 140
301 int unused;
302 #endif
303 struct _locale__Locimp *ptr;
304 } locale;
306 locale* __thiscall locale_ctor(locale*);
307 locale* __thiscall locale_copy_ctor(locale*, const locale*);
308 locale* __thiscall locale_operator_assign(locale*, const locale*);
309 void __thiscall locale_dtor(locale*);
310 void free_locale(void);
311 codecvt_char* codecvt_char_use_facet(const locale*);
312 codecvt_wchar* codecvt_wchar_use_facet(const locale*);
313 codecvt_wchar* codecvt_short_use_facet(const locale*);
314 ctype_char* ctype_char_use_facet(const locale*);
315 ctype_wchar* ctype_wchar_use_facet(const locale*);
316 ctype_wchar* ctype_short_use_facet(const locale*);
318 /* class _Init_locks */
319 typedef struct {
320 char empty_struct;
321 } _Init_locks;
323 void __cdecl _Init_locks__Init_locks_ctor(_Init_locks*);
324 void __cdecl _Init_locks__Init_locks_dtor(_Init_locks*);
326 /* class _Lockit */
327 typedef struct {
328 #if _MSVCP_VER >= 70
329 int locktype;
330 #else
331 char empty_struct;
332 #endif
333 } _Lockit;
335 #define _LOCK_LOCALE 0
336 #define _LOCK_MALLOC 1
337 #define _LOCK_STREAM 2
338 #define _LOCK_DEBUG 3
339 #define _MAX_LOCK 4
341 _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int);
342 void __thiscall _Lockit_dtor(_Lockit*);
344 /* class mutex */
345 typedef struct {
346 void *mutex;
347 } mutex;
349 mutex* __thiscall mutex_ctor(mutex*);
350 void __thiscall mutex_dtor(mutex*);
351 void __thiscall mutex_lock(mutex*);
352 void __thiscall mutex_unlock(mutex*);
354 typedef enum {
355 FMTFLAG_skipws = 0x0001,
356 FMTFLAG_unitbuf = 0x0002,
357 FMTFLAG_uppercase = 0x0004,
358 FMTFLAG_showbase = 0x0008,
359 FMTFLAG_showpoint = 0x0010,
360 FMTFLAG_showpos = 0x0020,
361 FMTFLAG_left = 0x0040,
362 FMTFLAG_right = 0x0080,
363 FMTFLAG_internal = 0x0100,
364 FMTFLAG_dec = 0x0200,
365 FMTFLAG_oct = 0x0400,
366 FMTFLAG_hex = 0x0800,
367 FMTFLAG_scientific = 0x1000,
368 FMTFLAG_fixed = 0x2000,
369 FMTFLAG_hexfloat = 0x3000,
370 FMTFLAG_boolalpha = 0x4000,
371 FMTFLAG_stdio = 0x8000,
372 FMTFLAG_adjustfield = FMTFLAG_left|FMTFLAG_right|FMTFLAG_internal,
373 FMTFLAG_basefield = FMTFLAG_dec|FMTFLAG_oct|FMTFLAG_hex,
374 FMTFLAG_floatfield = FMTFLAG_scientific|FMTFLAG_fixed,
375 FMTFLAG_mask = 0xffff
376 } IOSB_fmtflags;
378 typedef enum {
379 OPENMODE_in = 0x01,
380 OPENMODE_out = 0x02,
381 OPENMODE_ate = 0x04,
382 OPENMODE_app = 0x08,
383 OPENMODE_trunc = 0x10,
384 OPENMODE__Nocreate = 0x40,
385 OPENMODE__Noreplace = 0x80,
386 OPENMODE_binary = 0x20,
387 OPENMODE_mask = 0xff
388 } IOSB_openmode;
390 typedef enum {
391 SEEKDIR_beg = 0x0,
392 SEEKDIR_cur = 0x1,
393 SEEKDIR_end = 0x2,
394 SEEKDIR_mask = 0x3
395 } IOSB_seekdir;
397 typedef enum {
398 IOSTATE_goodbit = 0x00,
399 IOSTATE_eofbit = 0x01,
400 IOSTATE_failbit = 0x02,
401 IOSTATE_badbit = 0x04,
402 IOSTATE__Hardfail = 0x10,
403 IOSTATE_mask = 0x17
404 } IOSB_iostate;
406 typedef struct _iosarray {
407 struct _iosarray *next;
408 int index;
409 LONG long_val;
410 void *ptr_val;
411 } IOS_BASE_iosarray;
413 typedef enum {
414 EVENT_erase_event,
415 EVENT_imbue_event,
416 EVENT_copyfmt_event
417 } IOS_BASE_event;
419 struct _ios_base;
420 typedef void (CDECL *IOS_BASE_event_callback)(IOS_BASE_event, struct _ios_base*, int);
421 typedef struct _fnarray {
422 struct _fnarray *next;
423 int index;
424 IOS_BASE_event_callback event_handler;
425 } IOS_BASE_fnarray;
427 /* class ios_base */
428 typedef struct _ios_base {
429 const vtable_ptr *vtable;
430 #if _MSVCP_VER >= 100
431 size_t DECLSPEC_ALIGN(8) stdstr;
432 #elif _MSVCP_VER >= 71
433 size_t stdstr;
434 #endif
435 IOSB_iostate state;
436 IOSB_iostate except;
437 IOSB_fmtflags fmtfl;
438 streamsize prec;
439 streamsize wide;
440 IOS_BASE_iosarray *arr;
441 IOS_BASE_fnarray *calls;
442 #if _MSVCP_VER < 70
443 locale loc;
444 #else
445 locale *loc;
446 #endif
447 #if _MSVCP_VER <= 70
448 size_t stdstr;
449 #endif
450 } ios_base;
452 /* class basic_streambuf<char> */
453 typedef struct {
454 const vtable_ptr *vtable;
455 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
456 mutex lock;
457 #endif
458 char *rbuf;
459 char *wbuf;
460 char **prbuf;
461 char **pwbuf;
462 char *rpos;
463 char *wpos;
464 char **prpos;
465 char **pwpos;
466 int rsize;
467 int wsize;
468 int *prsize;
469 int *pwsize;
470 #if _MSVCP_VER < 70
471 locale loc;
472 #else
473 locale *loc;
474 #endif
475 } basic_streambuf_char;
477 typedef struct {
478 basic_streambuf_char *strbuf;
479 bool got;
480 char val;
481 } istreambuf_iterator_char;
483 typedef struct {
484 #if _MSVCP_VER == 80
485 void *iter_container;
486 #endif
487 bool failed;
488 basic_streambuf_char *strbuf;
489 } ostreambuf_iterator_char;
491 int __thiscall basic_streambuf_char_sgetc(basic_streambuf_char*);
492 int __thiscall basic_streambuf_char_sbumpc(basic_streambuf_char*);
493 int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
495 /* class basic_streambuf<wchar> */
496 typedef struct {
497 const vtable_ptr *vtable;
498 #if _MSVCP_VER >= 70 && _MSVCP_VER <= 100
499 mutex lock;
500 #endif
501 wchar_t *rbuf;
502 wchar_t *wbuf;
503 wchar_t **prbuf;
504 wchar_t **pwbuf;
505 wchar_t *rpos;
506 wchar_t *wpos;
507 wchar_t **prpos;
508 wchar_t **pwpos;
509 int rsize;
510 int wsize;
511 int *prsize;
512 int *pwsize;
513 #if _MSVCP_VER < 70
514 locale loc;
515 #else
516 locale *loc;
517 #endif
518 } basic_streambuf_wchar;
520 typedef struct {
521 basic_streambuf_wchar *strbuf;
522 bool got;
523 wchar_t val;
524 } istreambuf_iterator_wchar;
526 typedef struct {
527 #if _MSVCP_VER == 80
528 void *iter_container;
529 #endif
530 bool failed;
531 basic_streambuf_wchar *strbuf;
532 } ostreambuf_iterator_wchar;
534 unsigned short __thiscall basic_streambuf_wchar_sgetc(basic_streambuf_wchar*);
535 unsigned short __thiscall basic_streambuf_wchar_sbumpc(basic_streambuf_wchar*);
536 unsigned short __thiscall basic_streambuf_wchar_sputc(basic_streambuf_wchar*, wchar_t);
538 #if _MSVCP_VER < 70
539 #define IOS_LOCALE(ios) (&(ios)->loc)
540 #else
541 #define IOS_LOCALE(ios) ((ios)->loc)
542 #endif
544 /* class num_get<char> */
545 typedef struct {
546 locale_facet facet;
547 #if _MSVCP_VER <= 100
548 _Cvtvec cvt;
549 #endif
550 } num_get;
552 num_get* num_get_char_use_facet(const locale*);
553 istreambuf_iterator_char* __thiscall num_get_char_get_long(const num_get*, istreambuf_iterator_char*,
554 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONG*);
555 istreambuf_iterator_char* __thiscall num_get_char_get_ushort(const num_get*, istreambuf_iterator_char*,
556 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned short*);
557 istreambuf_iterator_char* __thiscall num_get_char_get_uint(const num_get*, istreambuf_iterator_char*,
558 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, unsigned int*);
559 istreambuf_iterator_char* __thiscall num_get_char_get_ulong(const num_get*, istreambuf_iterator_char*,
560 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONG*);
561 istreambuf_iterator_char* __thiscall num_get_char_get_float(const num_get*, istreambuf_iterator_char*,
562 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, float*);
563 istreambuf_iterator_char *__thiscall num_get_char_get_double(const num_get*, istreambuf_iterator_char*,
564 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
565 istreambuf_iterator_char *__thiscall num_get_char_get_ldouble(const num_get*, istreambuf_iterator_char*,
566 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, double*);
567 istreambuf_iterator_char *__thiscall num_get_char_get_void(const num_get*, istreambuf_iterator_char*,
568 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, void**);
569 istreambuf_iterator_char *__thiscall num_get_char_get_int64(const num_get*, istreambuf_iterator_char*,
570 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, LONGLONG*);
571 istreambuf_iterator_char *__thiscall num_get_char_get_uint64(const num_get*, istreambuf_iterator_char*,
572 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, ULONGLONG*);
573 istreambuf_iterator_char *__thiscall num_get_char_get_bool(const num_get*, istreambuf_iterator_char*,
574 istreambuf_iterator_char, istreambuf_iterator_char, ios_base*, int*, bool*);
576 num_get* num_get_wchar_use_facet(const locale*);
577 num_get* num_get_short_use_facet(const locale*);
578 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_long(const num_get*, istreambuf_iterator_wchar*,
579 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONG*);
580 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ushort(const num_get*, istreambuf_iterator_wchar*,
581 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned short*);
582 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_uint(const num_get*, istreambuf_iterator_wchar*,
583 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, unsigned int*);
584 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_ulong(const num_get*, istreambuf_iterator_wchar*,
585 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONG*);
586 istreambuf_iterator_wchar* __thiscall num_get_wchar_get_float(const num_get*, istreambuf_iterator_wchar*,
587 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, float*);
588 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_double(const num_get*, istreambuf_iterator_wchar*,
589 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
590 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_ldouble(const num_get*, istreambuf_iterator_wchar*,
591 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, double*);
592 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_void(const num_get*, istreambuf_iterator_wchar*,
593 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, void**);
594 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_int64(const num_get*, istreambuf_iterator_wchar*,
595 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, LONGLONG*);
596 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_uint64(const num_get*, istreambuf_iterator_wchar*,
597 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, ULONGLONG*);
598 istreambuf_iterator_wchar *__thiscall num_get_wchar_get_bool(const num_get*, istreambuf_iterator_wchar*,
599 istreambuf_iterator_wchar, istreambuf_iterator_wchar, ios_base*, int*, bool*);
601 /* class num_put<char> */
602 /* class num_put<wchar> */
603 typedef struct {
604 locale_facet facet;
605 #if _MSVCP_VER < 110
606 _Cvtvec cvt;
607 #endif
608 } num_put;
610 num_put* num_put_char_use_facet(const locale*);
611 ostreambuf_iterator_char* __thiscall num_put_char_put_long(const num_put*, ostreambuf_iterator_char*,
612 ostreambuf_iterator_char, ios_base*, char, LONG);
613 ostreambuf_iterator_char* __thiscall num_put_char_put_ulong(const num_put*, ostreambuf_iterator_char*,
614 ostreambuf_iterator_char, ios_base*, char, ULONG);
615 ostreambuf_iterator_char* __thiscall num_put_char_put_double(const num_put*, ostreambuf_iterator_char*,
616 ostreambuf_iterator_char, ios_base*, char, double);
617 ostreambuf_iterator_char* __thiscall num_put_char_put_ldouble(const num_put*, ostreambuf_iterator_char*,
618 ostreambuf_iterator_char, ios_base*, char, double);
619 ostreambuf_iterator_char* __thiscall num_put_char_put_ptr(const num_put*, ostreambuf_iterator_char*,
620 ostreambuf_iterator_char, ios_base*, char, const void*);
621 ostreambuf_iterator_char* __thiscall num_put_char_put_int64(const num_put*, ostreambuf_iterator_char*,
622 ostreambuf_iterator_char, ios_base*, char, __int64);
623 ostreambuf_iterator_char* __thiscall num_put_char_put_uint64(const num_put*, ostreambuf_iterator_char*,
624 ostreambuf_iterator_char, ios_base*, char, unsigned __int64);
625 ostreambuf_iterator_char* __thiscall num_put_char_put_bool(const num_put*, ostreambuf_iterator_char*,
626 ostreambuf_iterator_char, ios_base*, char, bool);
628 num_put* num_put_wchar_use_facet(const locale*);
629 num_put* num_put_short_use_facet(const locale*);
630 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_long(const num_put*, ostreambuf_iterator_wchar*,
631 ostreambuf_iterator_wchar, ios_base*, wchar_t, LONG);
632 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ulong(const num_put*, ostreambuf_iterator_wchar*,
633 ostreambuf_iterator_wchar, ios_base*, wchar_t, ULONG);
634 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_double(const num_put*, ostreambuf_iterator_wchar*,
635 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
636 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ldouble(const num_put*, ostreambuf_iterator_wchar*,
637 ostreambuf_iterator_wchar, ios_base*, wchar_t, double);
638 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_ptr(const num_put*, ostreambuf_iterator_wchar*,
639 ostreambuf_iterator_wchar, ios_base*, wchar_t, const void*);
640 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_int64(const num_put*, ostreambuf_iterator_wchar*,
641 ostreambuf_iterator_wchar, ios_base*, wchar_t, __int64);
642 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_uint64(const num_put*, ostreambuf_iterator_wchar*,
643 ostreambuf_iterator_wchar, ios_base*, wchar_t, unsigned __int64);
644 ostreambuf_iterator_wchar* __thiscall num_put_wchar_put_bool(const num_put*, ostreambuf_iterator_wchar*,
645 ostreambuf_iterator_wchar, ios_base*, wchar_t, bool);
647 void init_exception(void*);
648 void init_locale(void*);
649 void init_io(void*);
650 void free_io(void);
652 #if _MSVCP_VER >= 100
653 void init_concurrency_details(void*);
654 void init_misc(void*);
655 void free_misc(void);
656 #endif
658 /* class complex<float> */
659 typedef struct {
660 float real;
661 float imag;
662 } complex_float;
664 /* class complex<double> */
665 /* class complex<long double> */
666 typedef struct {
667 double real;
668 double imag;
669 } complex_double;
671 #if _MSVCP_VER < 80
672 static inline int memcpy_wrapper( void *dst, size_t size, const void *src, size_t count )
674 memcpy( dst, src, count );
675 return 0;
677 static inline int memmove_wrapper( void *dst, size_t size, const void *src, size_t count )
679 memmove( dst, src, count );
680 return 0;
682 static inline int mbstowcs_wrapper( size_t *ret, wchar_t *wcs, size_t size, const char *mbs, size_t count )
684 mbstowcs( wcs, mbs, count );
685 return 0;
687 #define memcpy_s( dst, size, src, count ) memcpy_wrapper( dst, size, src, count )
688 #define memmove_s( dst, size, src, count ) memmove_wrapper( dst, size, src, count )
689 #define mbstowcs_s( ret, wcs, size, mbs, count ) mbstowcs_wrapper( ret, wcs, size, mbs, count )
690 #define hypotf( x, y ) ((float)hypot( (double)(x), (double)(y) ))
691 #endif
693 void WINAPI DECLSPEC_NORETURN _CxxThrowException(void*,const cxx_exception_type*);
694 void __cdecl DECLSPEC_NORETURN _Xinvalid_argument(const char*);
695 void __cdecl DECLSPEC_NORETURN _Xlength_error(const char*);
696 void __cdecl DECLSPEC_NORETURN _Xmem(void);
697 void __cdecl DECLSPEC_NORETURN _Xout_of_range(const char*);
698 void __cdecl DECLSPEC_NORETURN _Xruntime_error(const char*);
699 void DECLSPEC_NORETURN throw_exception(const char*);
700 void DECLSPEC_NORETURN throw_failure(const char*);
701 void DECLSPEC_NORETURN throw_range_error(const char*);