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 WINE_DEFAULT_DEBUG_CHANNEL(advapi); 13 #ifndef _UNICODE 14 #define debugstr_aw debugstr_a 15 #else 16 #define debugstr_aw debugstr_w 17 #endif 18 19 20 typedef UINT (WINAPI *fnMsiProvideComponentFromDescriptor)(LPCWSTR,LPWSTR,DWORD*,DWORD*); 21 22 DWORD WINAPI CommandLineFromMsiDescriptor( WCHAR *szDescriptor, 23 WCHAR *szCommandLine, DWORD *pcchCommandLine ) 24 { 25 static const WCHAR szMsi[] = { 'm','s','i',0 }; 26 fnMsiProvideComponentFromDescriptor mpcfd; 27 HMODULE hmsi; 28 UINT r = ERROR_CALL_NOT_IMPLEMENTED; 29 30 TRACE("%S %p %p\n", szDescriptor, szCommandLine, pcchCommandLine); 31 32 hmsi = LoadLibraryW( szMsi ); 33 if (!hmsi) 34 return r; 35 mpcfd = (void*) GetProcAddress( hmsi, "MsiProvideComponentFromDescriptorW" ); 36 if (mpcfd) 37 r = mpcfd( szDescriptor, szCommandLine, pcchCommandLine, NULL ); 38 FreeLibrary( hmsi ); 39 return r; 40 } 41 42 /* EOF */ 43