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
23 ASSEMBLY_STATUS_IN_PROGRESS
,
24 ASSEMBLY_STATUS_INSTALLED
,
27 struct assembly_identity
36 struct dependency_entry
39 struct assembly_identity identity
;
49 struct registrykv_entry
57 struct registryop_entry
61 struct list keyvalues
;
70 struct assembly_identity identity
;
71 struct list dependencies
;
73 struct list registryops
;
76 void free_assembly(struct assembly_entry
*entry
) DECLSPEC_HIDDEN
;
77 void free_dependency(struct dependency_entry
*entry
) DECLSPEC_HIDDEN
;
78 struct assembly_entry
*load_manifest(const WCHAR
*filename
) DECLSPEC_HIDDEN
;
79 BOOL
load_update(const WCHAR
*filename
, struct list
*update_list
) DECLSPEC_HIDDEN
;
81 static inline char *strdupWtoA(const WCHAR
*str
)
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
);
92 static inline WCHAR
*strdupAtoW(const char *str
)
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
);
103 static inline WCHAR
*strdupWn(const WCHAR
*str
, DWORD len
)
106 if (!str
) return NULL
;
107 if ((ret
= malloc((len
+ 1) * sizeof(WCHAR
))))
109 memcpy(ret
, str
, len
* sizeof(WCHAR
));