ntoskrnl.exe: Reimplement KeSetTimerEx() on top of thread pool.
[wine.git] / dlls / adsldp / adsldp_private.h
blobea3d247deeb94178f9c9d03b98a6dd666848c60a
1 /*
2 * Copyright 2020 Dmitry Timoshkov
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 #ifndef _ADSLDP_PRIVATE_H
20 #define _ADSLDP_PRIVATE_H
22 #include "wine/heap.h"
24 static inline WCHAR *strdupW(const WCHAR *src)
26 WCHAR *dst;
27 if (!src) return NULL;
28 if ((dst = heap_alloc((wcslen(src) + 1) * sizeof(WCHAR)))) wcscpy(dst, src);
29 return dst;
32 static inline LPWSTR strnUtoW( LPCSTR str, DWORD inlen, DWORD *outlen )
34 LPWSTR ret = NULL;
35 *outlen = 0;
36 if (str)
38 DWORD len = MultiByteToWideChar( CP_UTF8, 0, str, inlen, NULL, 0 );
39 if ((ret = heap_alloc( (len + 1) * sizeof(WCHAR) )))
41 MultiByteToWideChar( CP_UTF8, 0, str, inlen, ret, len );
42 ret[len] = 0;
43 *outlen = len;
46 return ret;
49 struct attribute_type
51 WCHAR *oid;
52 WCHAR *name;
53 ULONG name_count;
54 WCHAR *syntax;
55 int single_value;
58 DWORD map_ldap_error(DWORD) DECLSPEC_HIDDEN;
59 struct attribute_type *load_schema(LDAP *ld, ULONG *, ULONG *) DECLSPEC_HIDDEN;
60 ADSTYPEENUM get_schema_type(const WCHAR *, const struct attribute_type *, ULONG, ULONG) DECLSPEC_HIDDEN;
61 void free_attribute_types(struct attribute_type *, ULONG) DECLSPEC_HIDDEN;
63 #endif