wintrust: Use path in WIN_TRUST_SUBJECT_FILE structure rather than assuming a path...
[wine] / dlls / ole32 / ole2nls.c
1 /*
2  *      OLE2NLS library
3  *
4  *      Copyright 1995  Martin von Loewis
5  *      Copyright 1998  David Lee Lambert
6  *      Copyright 2000  Julio César Gázquez
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22
23 #include "config.h"
24
25 #include <string.h>
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <ctype.h>
29 #include <stdlib.h>
30 #include <locale.h>
31
32 #include "windef.h"
33 #include "winbase.h"
34 #include "winnls.h"
35 #include "winuser.h"
36
37 #include "wine/winbase16.h"
38
39 #include "wine/debug.h"
40
41 WINE_DEFAULT_DEBUG_CHANNEL(ole);
42
43 static LPVOID lpNLSInfo = NULL;
44
45 /******************************************************************************
46  *              GetLocaleInfoA  [OLE2NLS.5]
47  * Is the last parameter really WORD for Win16?
48  */
49 INT16 WINAPI GetLocaleInfo16(LCID lcid,LCTYPE LCType,LPSTR buf,INT16 len)
50 {
51         return GetLocaleInfoA(lcid,LCType,buf,len);
52 }
53
54 /******************************************************************************
55  *              GetStringTypeA  [OLE2NLS.7]
56  */
57 BOOL16 WINAPI GetStringType16(LCID locale,DWORD dwInfoType,LPCSTR src,
58                               INT16 cchSrc,LPWORD chartype)
59 {
60         return GetStringTypeExA(locale,dwInfoType,src,cchSrc,chartype);
61 }
62
63 /******************************************************************************
64  *              GetUserDefaultLCID      [OLE2NLS.1]
65  */
66 LCID WINAPI GetUserDefaultLCID16(void)
67 {
68     return GetUserDefaultLCID();
69 }
70
71 /******************************************************************************
72  *              GetSystemDefaultLCID    [OLE2NLS.2]
73  */
74 LCID WINAPI GetSystemDefaultLCID16(void)
75 {
76     return GetSystemDefaultLCID();
77 }
78
79 /******************************************************************************
80  *              GetUserDefaultLangID    [OLE2NLS.3]
81  */
82 LANGID WINAPI GetUserDefaultLangID16(void)
83 {
84     return GetUserDefaultLangID();
85 }
86
87 /******************************************************************************
88  *              GetSystemDefaultLangID  [OLE2NLS.4]
89  */
90 LANGID WINAPI GetSystemDefaultLangID16(void)
91 {
92     return GetSystemDefaultLangID();
93 }
94
95 /******************************************************************************
96  *              LCMapStringA    [OLE2NLS.6]
97  */
98 INT16 WINAPI LCMapString16(LCID lcid, DWORD mapflags, LPCSTR srcstr, INT16 srclen,
99                            LPSTR dststr, INT16 dstlen)
100 {
101     return LCMapStringA(lcid, mapflags, srcstr, srclen, dststr, dstlen);
102 }
103
104 /***********************************************************************
105  *           CompareStringA       (OLE2NLS.8)
106  */
107 UINT16 WINAPI CompareString16(DWORD lcid,DWORD fdwStyle,
108                               LPCSTR s1,DWORD l1,LPCSTR s2,DWORD l2)
109 {
110         return (UINT16)CompareStringA(lcid,fdwStyle,s1,l1,s2,l2);
111 }
112
113 /******************************************************************************
114  *      RegisterNLSInfoChanged  [OLE2NLS.9]
115  */
116 BOOL16 WINAPI RegisterNLSInfoChanged16(LPVOID lpNewNLSInfo) /* [???] FIXME */
117 {
118         FIXME("Fully implemented, but doesn't effect anything.\n");
119
120         if (!lpNewNLSInfo) {
121                 lpNLSInfo = NULL;
122                 return TRUE;
123         }
124         else {
125                 if (!lpNLSInfo) {
126                         lpNLSInfo = lpNewNLSInfo;
127                         return TRUE;
128                 }
129         }
130
131         return FALSE; /* ptr not set */
132 }