d3d9: Update presentation parameters when creating a swap chain.
[wine.git] / programs / wusa / wusa.h
blobdcc4850f10eb7d9ef0817866641bdb6aaabd5d20
1 /*
2 * Copyright 2015 Michael Müller
3 * Copyright 2015 Sebastian Lackner
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 enum
22 ASSEMBLY_STATUS_NONE,
23 ASSEMBLY_STATUS_IN_PROGRESS,
24 ASSEMBLY_STATUS_INSTALLED,
27 struct assembly_identity
29 WCHAR *name;
30 WCHAR *version;
31 WCHAR *architecture;
32 WCHAR *language;
33 WCHAR *pubkey_token;
36 struct dependency_entry
38 struct list entry;
39 struct assembly_identity identity;
42 struct fileop_entry
44 struct list entry;
45 WCHAR *source;
46 WCHAR *target;
49 struct registrykv_entry
51 struct list entry;
52 WCHAR *name;
53 WCHAR *value_type;
54 WCHAR *value;
57 struct registryop_entry
59 struct list entry;
60 WCHAR *key;
61 struct list keyvalues;
64 struct assembly_entry
66 struct list entry;
67 DWORD status;
68 WCHAR *filename;
69 WCHAR *displayname;
70 struct assembly_identity identity;
71 struct list dependencies;
72 struct list fileops;
73 struct list registryops;
76 void free_assembly(struct assembly_entry *entry);
77 void free_dependency(struct dependency_entry *entry);
78 struct assembly_entry *load_manifest(const WCHAR *filename);
79 BOOL load_update(const WCHAR *filename, struct list *update_list);
81 static inline char *strdupWtoA(const WCHAR *str)
83 char *ret = NULL;
84 DWORD len;
86 if (!str) return ret;
87 len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
88 if ((ret = malloc(len))) WideCharToMultiByte(CP_ACP, 0, str, -1, ret, len, NULL, NULL);
89 return ret;
92 static inline WCHAR *strdupAtoW(const char *str)
94 WCHAR *ret = NULL;
95 DWORD len;
97 if (!str) return ret;
98 len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
99 if ((ret = malloc(len * sizeof(WCHAR)))) MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
100 return ret;
103 static inline WCHAR *strdupWn(const WCHAR *str, DWORD len)
105 WCHAR *ret;
106 if (!str) return NULL;
107 if ((ret = malloc((len + 1) * sizeof(WCHAR))))
109 memcpy(ret, str, len * sizeof(WCHAR));
110 ret[len] = 0;
112 return ret;