From: Asanka Herath Date: Thu, 7 Sep 2006 00:12:31 +0000 (+0000) Subject: windows-afs-shell-ext-32bit-20060906 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1053 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=19e16d34a61945dd1ff3d2f93e48662087654daa;p=packages%2Fo%2Fopenafs.git windows-afs-shell-ext-32bit-20060906 Generate a new GUID for the 64-bit AFS Shell Extension and install the 32-bit version as part of the 32-bit tools --- diff --git a/src/WINNT/client_exp/afs_shl_ext.cpp b/src/WINNT/client_exp/afs_shl_ext.cpp index d93caaa4b..e556064d1 100644 --- a/src/WINNT/client_exp/afs_shl_ext.cpp +++ b/src/WINNT/client_exp/afs_shl_ext.cpp @@ -28,8 +28,19 @@ extern "C" { static char THIS_FILE[] = __FILE__; #endif +#ifndef _WIN64 + +// 32-bit +static const IID IID_IShellExt = + { 0xdc515c27, 0x6cac, 0x11d1, { 0xba, 0xe7, 0x0, 0xc0, 0x4f, 0xd1, 0x40, 0xd2 } }; + +#else + +// 64-bit static const IID IID_IShellExt = -{ 0xdc515c27, 0x6cac, 0x11d1, { 0xba, 0xe7, 0x0, 0xc0, 0x4f, 0xd1, 0x40, 0xd2 } }; + { 0x5f820ca1, 0x3dde, 0x11db, {0xb2, 0xce, 0x00, 0x15, 0x58, 0x09, 0x2d, 0xb5} }; + +#endif ///////////////////////////////////////////////////////////////////////////// // CAfsShlExt @@ -155,7 +166,7 @@ STDAPI DllRegisterServer(void) } /* - [HKEY_CLASSES_ROOT\CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32] + [HKEY_CLASSES_ROOT\CLSID\{$CLSID}\InprocServer32] @="Y:\\DEST\\root.client\\usr\\vice\\etc\\afs_shl_ext.dll" "ThreadingModel"="Apartment" */ @@ -181,10 +192,10 @@ STDAPI DllRegisterServer(void) //If running on NT, register the extension as approved. /* [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] - "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"="AFS Client Shell Extension" + "{$(CLSID)}"="AFS Client Shell Extension" [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\AFS Client Shell Extension] - @="{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + @="{$(CLSID)}" */ OSVERSIONINFO osvi; @@ -207,7 +218,7 @@ STDAPI DllRegisterServer(void) Register InfoTip [HKEY_CLASSES_ROOT\Folder\shellex\{00021500-0000-0000-C000-000000000046}] - @="{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" + @="{$(CLSID)}" */ wsprintf(szSubKey, TEXT("Folder\\shellex\\{00021500-0000-0000-C000-000000000046}")); diff --git a/src/WINNT/client_exp/afs_shl_ext.odl b/src/WINNT/client_exp/afs_shl_ext.odl index dc126398b..3c3eab0dc 100644 --- a/src/WINNT/client_exp/afs_shl_ext.odl +++ b/src/WINNT/client_exp/afs_shl_ext.odl @@ -7,14 +7,30 @@ * directory or online at http://www.openafs.org/dl/license10.html */ -[ uuid(DC515C1A-6CAC-11D1-BAE7-00C04FD140D2), version(1.0) ] +#ifndef _WIN64 + +/* 32-bit UUIDs */ +#define lib_uuid DC515C1A-6CAC-11D1-BAE7-00C04FD140D2 +#define int_uuid DC515C27-6CAC-11D1-BAE7-00C04FD140D2 +#define class_uuid DC515C29-6CAC-11D1-BAE7-00C04FD140D2 + +#else + +/* 64-bit UUIDs */ +#define lib_uuid 5F820CA0-3DDE-11DB-B2CE-001558092DB5 +#define int_uuid 5F820CA1-3DDE-11DB-B2CE-001558092DB5 +#define class_uuid 5F820CA2-3DDE-11DB-B2CE-001558092DB5 + +#endif + +[ uuid(lib_uuid), version(1.0) ] library afs_shl_ext { importlib("stdole32.tlb"); // Primary dispatch interface for CShellExt - [ uuid(DC515C27-6CAC-11D1-BAE7-00C04FD140D2) ] + [ uuid(int_uuid) ] dispinterface IShellExt { properties: @@ -33,7 +49,7 @@ library afs_shl_ext // Class information for CShellExt - [ uuid(DC515C29-6CAC-11D1-BAE7-00C04FD140D2) ] + [ uuid(class_uuid) ] coclass ShellExt { [default] dispinterface IShellExt; diff --git a/src/WINNT/client_exp/shell_ext.cpp b/src/WINNT/client_exp/shell_ext.cpp index eab767614..86fd34cfe 100644 --- a/src/WINNT/client_exp/shell_ext.cpp +++ b/src/WINNT/client_exp/shell_ext.cpp @@ -123,9 +123,17 @@ END_DISPATCH_MAP() // from VBA. This IID must match the GUID that is attached to the // dispinterface in the .ODL file. +#ifndef _WIN64 +// 32-bit // {DC515C27-6CAC-11D1-BAE7-00C04FD140D2} static const IID IID_IShellExt = { 0xdc515c27, 0x6cac, 0x11d1, { 0xba, 0xe7, 0x0, 0xc0, 0x4f, 0xd1, 0x40, 0xd2 } }; +#else +// 64-bit +// {5f820ca1-3dde-11db-b2ce-001558092db5} +static const IID IID_IShellExt = +{ 0x5f820ca1, 0x3dde, 0x11db, {0xb2, 0xce, 0x00, 0x15, 0x58, 0x09, 0x2d, 0xb5 } }; +#endif BEGIN_INTERFACE_MAP(CShellExt, CCmdTarget) INTERFACE_PART(CShellExt, IID_IShellExt, Dispatch) @@ -136,7 +144,13 @@ BEGIN_INTERFACE_MAP(CShellExt, CCmdTarget) INTERFACE_PART(CShellExt, IID_IPersistFile , PersistFileExt) END_INTERFACE_MAP() +#ifndef _WIN64 + // 32-bit IMPLEMENT_OLECREATE(CShellExt, STR_EXT_TITLE, 0xdc515c27, 0x6cac, 0x11d1, 0xba, 0xe7, 0x0, 0xc0, 0x4f, 0xd1, 0x40, 0xd2) +#else + // 64-bit +IMPLEMENT_OLECREATE(CShellExt, STR_EXT_TITLE, 0x5f820ca1, 0x3dde, 0x11db, 0xb2, 0xce, 0x0, 0x15, 0x58, 0x09, 0x2d, 0xb5) +#endif ///////////////////////////////////////////////////////////////////////////// diff --git a/src/WINNT/install/wix/feature.wxi b/src/WINNT/install/wix/feature.wxi index 36674b679..bb36097e6 100644 --- a/src/WINNT/install/wix/feature.wxi +++ b/src/WINNT/install/wix/feature.wxi @@ -298,6 +298,8 @@ + + diff --git a/src/WINNT/install/wix/files.wxi b/src/WINNT/install/wix/files.wxi index b4376b566..7ec03bbd3 100644 --- a/src/WINNT/install/wix/files.wxi +++ b/src/WINNT/install/wix/files.wxi @@ -836,9 +836,11 @@ + + - + @@ -848,6 +850,8 @@ + + @@ -932,10 +936,10 @@ + - @@ -1389,15 +1393,12 @@ - - - - - - - - - + + + + + + diff --git a/src/WINNT/install/wix/platform.wxi b/src/WINNT/install/wix/platform.wxi index 788456ec0..e8b1d8fa3 100644 --- a/src/WINNT/install/wix/platform.wxi +++ b/src/WINNT/install/wix/platform.wxi @@ -98,6 +98,7 @@ + @@ -196,6 +197,7 @@ + diff --git a/src/WINNT/install/wix/registry.wxi b/src/WINNT/install/wix/registry.wxi index a1f7e5bfa..5112253d8 100644 --- a/src/WINNT/install/wix/registry.wxi +++ b/src/WINNT/install/wix/registry.wxi @@ -64,7 +64,14 @@ - + + + + + + + + @@ -84,8 +91,6 @@ - - @@ -106,11 +111,7 @@ - - - - @@ -205,7 +206,7 @@ - + @@ -231,6 +232,15 @@ + + + + + + + + +