More .nsh COM stuff (IShellItem, IStartMenuPinnedList, IPropertyStore and basic PROPVARIANT support)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6144 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2011-03-13 20:41:17 +00:00
parent c47d4b12f7
commit 367a67b965
2 changed files with 70 additions and 1 deletions

View file

@ -148,6 +148,31 @@ ${NSISCOMIFACEDECL}IShellLinkDataList SetFlags 7 (i)i
!define /ifndef SLDF_PREFER_ENVIRONMENT_PATH 0x02000000
!define /ifndef SLDF_KEEP_LOCAL_IDLIST_FOR_UNC_TARGET 0x04000000
!ifndef IID_IShellItem
!define IID_IShellItem {43826d1e-e718-42ee-bc55-a1e261c37bfe}
${NSISCOMIFACEDECL}IShellItem BindToHandler 3 (p,g,g,*p)i
${NSISCOMIFACEDECL}IShellItem GetParent 4 (*p)i
${NSISCOMIFACEDECL}IShellItem GetDisplayName 5 (i,*p)i
${NSISCOMIFACEDECL}IShellItem GetAttributes 6 (i,*i)i
${NSISCOMIFACEDECL}IShellItem Compare 7 (p,i,*i)i
!endif
!ifndef CLSID_StartMenuPin
!define CLSID_StartMenuPin {a2a9545d-a0c2-42b4-9708-a0b2badd77c8}
!endif
!ifndef IID_IStartMenuPinnedList
!define IID_IStartMenuPinnedList {4CD19ADA-25A5-4A32-B3B7-347BEE5BE36B}
${NSISCOMIFACEDECL}IStartMenuPinnedList RemoveFromList 3 (p)i
!endif
!ifndef IID_IPropertyStore
!define IID_IPropertyStore {886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99}
${NSISCOMIFACEDECL}IPropertyStore GetCount 3 (*i)i
${NSISCOMIFACEDECL}IPropertyStore GetAt 4 (i,p)i
${NSISCOMIFACEDECL}IPropertyStore GetValue 5 (p,p)i
${NSISCOMIFACEDECL}IPropertyStore SetValue 6 (p,p)i
${NSISCOMIFACEDECL}IPropertyStore Commit 7 ()i
!endif
!verbose pop
!endif /* __WIN_COM__INC */
!endif /* __WIN_COM__INC */

44
Include/Win/Propkey.nsh Normal file
View file

@ -0,0 +1,44 @@
!ifndef __WIN_PROPKEY__INC
!define __WIN_PROPKEY__INC
!verbose push
!verbose 3
/**************************************************
WTypes.h
**************************************************/
;NOTE: This list is incomplete
!define VT_EMPTY 0
!define VT_NULL 1
!define VT_I4 3
!define VT_BSTR 8
!define VT_BOOL 11
!define VT_UI4 19
!define VT_INT 22
!define VT_UINT 23
!define VT_HRESULT 25
!define VT_PTR 26
!define VT_SAFEARRAY 27
!define VT_LPSTR 30
!define VT_LPWSTR 31
!define SYSSIZEOF_PROPERTYKEY 20
!define SYSSTRUCT_PROPERTYKEY (&g16,&i4) ;System.dll is buggy when it comes to g and forces us to specify the size
/**************************************************
PropIdl.h
**************************************************/
!define SYSSIZEOF_PROPVARIANT 16
!define SYSSTRUCT_PROPVARIANT (&i2,&i6,&i8)
/**************************************************
Propkey.h
**************************************************/
!define PKEY_AppUserModel_ID '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",5'
!define PKEY_AppUserModel_PreventPinning '"{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}",9'
!verbose pop
!endif /* __WIN_PROPKEY__INC */