windowscodecs: Add support for more types of IFD fields.
[wine/multimedia.git] / dlls / msvcp80 / msvcp80.c
blob5f6951ed28e6f16ece53ede9443b9d1c9a82576d
1 /*
2 * msvcp80 specific functions
4 * Copyright 2010 Piotr Caban for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "windef.h"
24 #include "winbase.h"
26 typedef SIZE_T MSVCP_size_t;
27 struct locale_facet;
28 struct locale;
30 const struct locale* (CDECL *plocale_classic)(void);
31 MSVCP_size_t (CDECL *pcollate_char__Getcat)(const struct locale_facet**,const struct locale*);
32 MSVCP_size_t (CDECL *pcollate_wchar__Getcat)(const struct locale_facet**,const struct locale*);
33 MSVCP_size_t (CDECL *pcollate_short__Getcat)(const struct locale_facet**,const struct locale*);
34 MSVCP_size_t (CDECL *pctype_char__Getcat)(const struct locale_facet**,const struct locale*);
35 MSVCP_size_t (CDECL *pctype_wchar__Getcat)(const struct locale_facet**,const struct locale*);
36 MSVCP_size_t (CDECL *pctype_short__Getcat)(const struct locale_facet**,const struct locale*);
37 MSVCP_size_t (CDECL *pcodecvt_char__Getcat)(const struct locale_facet**,const struct locale*);
38 MSVCP_size_t (CDECL *pnumpunct_char__Getcat)(const struct locale_facet**,const struct locale*);
39 MSVCP_size_t (CDECL *pnumpunct_wchar__Getcat)(const struct locale_facet**,const struct locale*);
40 MSVCP_size_t (CDECL *pnumpunct_short__Getcat)(const struct locale_facet**,const struct locale*);
42 static BOOL init_funcs(void)
44 HMODULE hmod = GetModuleHandleA("msvcp90.dll");
45 if(!hmod)
46 return FALSE;
48 if(sizeof(void*) > sizeof(int)) { /* 64-bit has different names */
49 plocale_classic = (void*)GetProcAddress(hmod, "?classic@locale@std@@SAAEBV12@XZ");
50 pcollate_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
51 pcollate_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
52 pcollate_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
53 pctype_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
54 pctype_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
55 pctype_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
56 pcodecvt_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
57 pnumpunct_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
58 pnumpunct_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
59 pnumpunct_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@PEBV42@@Z");
60 }else {
61 plocale_classic = (void*)GetProcAddress(hmod, "?classic@locale@std@@SAABV12@XZ");
62 pcollate_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
63 pcollate_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
64 pcollate_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
65 pctype_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
66 pctype_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
67 pctype_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z(ptr");
68 pcodecvt_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
69 pnumpunct_char__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
70 pnumpunct_wchar__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
71 pnumpunct_short__Getcat = (void*)GetProcAddress(hmod, "?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@PBV42@@Z");
74 return TRUE;
77 BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
79 switch (reason)
81 case DLL_WINE_PREATTACH:
82 return FALSE; /* prefer native version */
84 case DLL_PROCESS_ATTACH:
85 DisableThreadLibraryCalls(hdll);
86 if(!init_funcs())
87 return FALSE;
89 return TRUE;
92 /* ?_Getcat@?$collate@D@std@@SAIPAPBVfacet@locale@2@@Z */
93 /* ?_Getcat@?$collate@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
94 MSVCP_size_t __cdecl collate_char__Getcat(const struct locale_facet **facet)
96 return pcollate_char__Getcat(facet, plocale_classic());
99 /* ?_Getcat@?$collate@_W@std@@SAIPAPBVfacet@locale@2@@Z */
100 /* ?_Getcat@?$collate@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
101 MSVCP_size_t __cdecl collate_wchar__Getcat(const struct locale_facet **facet)
103 return pcollate_wchar__Getcat(facet, plocale_classic());
106 /* ?_Getcat@?$collate@G@std@@SAIPAPBVfacet@locale@2@@Z */
107 /* ?_Getcat@?$collate@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
108 MSVCP_size_t __cdecl collate_short__Getcat(const struct locale_facet **facet)
110 return pcollate_short__Getcat(facet, plocale_classic());
113 /* ?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z */
114 /* ?_Getcat@?$ctype@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
115 MSVCP_size_t __cdecl ctype_char__Getcat(const struct locale_facet **facet)
117 return pctype_char__Getcat(facet, plocale_classic());
120 /* ?_Getcat@?$ctype@_W@std@@SAIPAPBVfacet@locale@2@@Z */
121 /* ?_Getcat@?$ctype@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
122 MSVCP_size_t __cdecl ctype_wchar__Getcat(const struct locale_facet **facet)
124 return pctype_wchar__Getcat(facet, plocale_classic());
127 /* ?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z */
128 /* ?_Getcat@?$ctype@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
129 MSVCP_size_t __cdecl ctype_short__Getcat(const struct locale_facet **facet)
131 return pctype_short__Getcat(facet, plocale_classic());
134 /* ?_Getcat@?$codecvt@DDH@std@@SAIPAPBVfacet@locale@2@@Z */
135 /* ?_Getcat@?$codecvt@DDH@std@@SA_KPEAPEBVfacet@locale@2@@Z */
136 MSVCP_size_t __cdecl codecvt_char__Getcat(const struct locale_facet **facet)
138 return pcodecvt_char__Getcat(facet, plocale_classic());
141 /* ?_Getcat@?$numpunct@D@std@@SAIPAPBVfacet@locale@2@@Z */
142 /* ?_Getcat@?$numpunct@D@std@@SA_KPEAPEBVfacet@locale@2@@Z */
143 MSVCP_size_t __cdecl numpunct_char__Getcat(const struct locale_facet **facet)
145 return pnumpunct_char__Getcat(facet, plocale_classic());
148 /* ?_Getcat@?$numpunct@_W@std@@SAIPAPBVfacet@locale@2@@Z */
149 /* ?_Getcat@?$numpunct@_W@std@@SA_KPEAPEBVfacet@locale@2@@Z */
150 MSVCP_size_t __cdecl numpunct_wchar__Getcat(const struct locale_facet **facet)
152 return pnumpunct_wchar__Getcat(facet, plocale_classic());
155 /* ?_Getcat@?$numpunct@G@std@@SAIPAPBVfacet@locale@2@@Z */
156 /* ?_Getcat@?$numpunct@G@std@@SA_KPEAPEBVfacet@locale@2@@Z */
157 MSVCP_size_t __cdecl numpunct_short__Getcat(const struct locale_facet **facet)
159 return pnumpunct_short__Getcat(facet, plocale_classic());