diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-22 12:18:50 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 20:25:48 +0100 |
commit | 4f63fbf96d797c5f1f8aa9f7d35d14bf0cb198b5 (patch) | |
tree | a9870380d77569ca9d659adc905ec31ed5dfb087 /libmsi | |
parent | 1dad58e97826df559e6b89f7e1d5da2fc1197ae3 (diff) | |
download | msitools-4f63fbf96d797c5f1f8aa9f7d35d14bf0cb198b5.tar.gz msitools-4f63fbf96d797c5f1f8aa9f7d35d14bf0cb198b5.tar.xz msitools-4f63fbf96d797c5f1f8aa9f7d35d14bf0cb198b5.zip |
remove ShellLink
Diffstat (limited to 'libmsi')
-rw-r--r-- | libmsi/msi.c | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/libmsi/msi.c b/libmsi/msi.c index 8f95672..ccb3f15 100644 --- a/libmsi/msi.c +++ b/libmsi/msi.c @@ -2838,91 +2838,6 @@ UINT WINAPI MsiCreateAndVerifyInstallerDirectory(DWORD dwReserved) return ERROR_SUCCESS; } -/*********************************************************************** - * MsiGetShortcutTargetA [MSI.@] - */ -UINT WINAPI MsiGetShortcutTargetA( LPCSTR szShortcutTarget, - LPSTR szProductCode, LPSTR szFeatureId, - LPSTR szComponentCode ) -{ - LPWSTR target; - const int len = MAX_FEATURE_CHARS+1; - WCHAR product[MAX_FEATURE_CHARS+1], feature[MAX_FEATURE_CHARS+1], component[MAX_FEATURE_CHARS+1]; - UINT r; - - target = strdupAtoW( szShortcutTarget ); - if (szShortcutTarget && !target ) - return ERROR_OUTOFMEMORY; - product[0] = 0; - feature[0] = 0; - component[0] = 0; - r = MsiGetShortcutTargetW( target, product, feature, component ); - msi_free( target ); - if (r == ERROR_SUCCESS) - { - WideCharToMultiByte( CP_ACP, 0, product, -1, szProductCode, len, NULL, NULL ); - WideCharToMultiByte( CP_ACP, 0, feature, -1, szFeatureId, len, NULL, NULL ); - WideCharToMultiByte( CP_ACP, 0, component, -1, szComponentCode, len, NULL, NULL ); - } - return r; -} - -/*********************************************************************** - * MsiGetShortcutTargetW [MSI.@] - */ -UINT WINAPI MsiGetShortcutTargetW( LPCWSTR szShortcutTarget, - LPWSTR szProductCode, LPWSTR szFeatureId, - LPWSTR szComponentCode ) -{ - IShellLinkDataList *dl = NULL; - IPersistFile *pf = NULL; - LPEXP_DARWIN_LINK darwin = NULL; - HRESULT r, init; - - TRACE("%s %p %p %p\n", debugstr_w(szShortcutTarget), - szProductCode, szFeatureId, szComponentCode ); - - init = CoInitialize(NULL); - - r = CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, - &IID_IPersistFile, (LPVOID*) &pf ); - if( SUCCEEDED( r ) ) - { - r = IPersistFile_Load( pf, szShortcutTarget, - STGM_READ | STGM_SHARE_DENY_WRITE ); - if( SUCCEEDED( r ) ) - { - r = IPersistFile_QueryInterface( pf, &IID_IShellLinkDataList, - (LPVOID*) &dl ); - if( SUCCEEDED( r ) ) - { - IShellLinkDataList_CopyDataBlock( dl, EXP_DARWIN_ID_SIG, - (LPVOID) &darwin ); - IShellLinkDataList_Release( dl ); - } - } - IPersistFile_Release( pf ); - } - - if (SUCCEEDED(init)) - CoUninitialize(); - - TRACE("darwin = %p\n", darwin); - - if (darwin) - { - DWORD sz; - UINT ret; - - ret = MsiDecomposeDescriptorW( darwin->szwDarwinID, - szProductCode, szFeatureId, szComponentCode, &sz ); - LocalFree( darwin ); - return ret; - } - - return ERROR_FUNCTION_FAILED; -} - typedef struct { unsigned int i[2]; |