1d1fa4cd7bc2b64c80d523ac77d840b3fe49ae89
[reactos.git] / reactos / dll / advapi32 / misc / msi.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/advapi32/misc/msi.c
5 * PURPOSE: advapi32.dll MSI interface funcs
6 * NOTES: Copied from Wine
7 * Copyright 1995 Sven Verdoolaege
8 */
9
10 #include <advapi32.h>
11
12 #define NDEBUG
13 #include <debug.h>
14
15 typedef UINT (WINAPI *fnMsiProvideComponentFromDescriptor)(LPCWSTR,LPWSTR,DWORD*,DWORD*);
16
17 DWORD WINAPI CommandLineFromMsiDescriptor( WCHAR *szDescriptor,
18 WCHAR *szCommandLine, DWORD *pcchCommandLine )
19 {
20 static const WCHAR szMsi[] = { 'm','s','i',0 };
21 fnMsiProvideComponentFromDescriptor mpcfd;
22 HMODULE hmsi;
23 UINT r = ERROR_CALL_NOT_IMPLEMENTED;
24
25 DPRINT("%S %p %p\n", szDescriptor, szCommandLine, pcchCommandLine);
26
27 hmsi = LoadLibraryW( szMsi );
28 if (!hmsi)
29 return r;
30 mpcfd = (void*) GetProcAddress( hmsi, "MsiProvideComponentFromDescriptorW" );
31 if (mpcfd)
32 r = mpcfd( szDescriptor, szCommandLine, pcchCommandLine, NULL );
33 FreeLibrary( hmsi );
34 return r;
35 }
36
37 /* EOF */