Skip to content

Commit

Permalink
Fix issue that prevented dragging items from one group to another
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfederer committed Nov 10, 2018
1 parent f6ba459 commit afc8c35
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 131 deletions.
41 changes: 40 additions & 1 deletion OutlookFileDrag/OutlookDataObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
namespace OutlookFileDrag
{
//Class that wraps Outlook data object and adds support for CF_HDROP format
class OutlookDataObject : NativeMethods.IDataObject
class OutlookDataObject : NativeMethods.IDataObject, ICustomQueryInterface
{
private NativeMethods.IDataObject innerData;
private string[] tempFilenames;
Expand Down Expand Up @@ -267,5 +267,44 @@ private void ExtractFiles()
}
}

public CustomQueryInterfaceResult GetInterface(ref Guid iid, out IntPtr ppv)
{
ppv = IntPtr.Zero;
try
{
log.DebugFormat("Get COM interface {0}", iid);

//For IDropSource interface, use interface on this object
if (iid == new Guid("0000010E-0000-0000-C000-000000000046"))
{
log.DebugFormat("Interface handled");
return CustomQueryInterfaceResult.NotHandled;
}

else
{
//For all other interfaces, use interface on original object
IntPtr pUnk = Marshal.GetIUnknownForObject(this.innerData);
int retVal = Marshal.QueryInterface(pUnk, ref iid, out ppv);
if (retVal == NativeMethods.S_OK)
{
log.DebugFormat("Interface handled by inner object");
return CustomQueryInterfaceResult.Handled;
}
else
{
log.DebugFormat("Interface not handled by inner object");
return CustomQueryInterfaceResult.Failed;
}
}

}
catch (Exception ex)
{
log.Error("Exception in ICustomQueryInterface", ex);
return CustomQueryInterfaceResult.Failed;
}

}
}
}
80 changes: 15 additions & 65 deletions OutlookFileDragSetup/OutlookFileDragSetup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
"Entry"
{
"MsmKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
"OwnerKey" = "8:_54EF5F74A56C4AEE96D4330B540B4A3A"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
"OwnerKey" = "8:_54EF5F74A56C4AEE96D4330B540B4A3A"
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
Expand Down Expand Up @@ -142,61 +142,61 @@
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
"OwnerKey" = "8:_591351D571FEB540A92347F0F74B55CE"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_15F0BD9071B5889215577FD20EC63766"
"OwnerKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_C3161A936F4192497A0972C3EC781BF6"
"OwnerKey" = "8:_9B3B11113C57483FCBDDB37CB3ED5F37"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_12FE3AC54ED17E0AB1007324ABFD58D1"
"OwnerKey" = "8:_BB365CE8FF8B85A3589349A35DAB0785"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_133D4E0B8AD91071625356F7F9F22C66"
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
"OwnerKey" = "8:_133D4E0B8AD91071625356F7F9F22C66"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_BB365CE8FF8B85A3589349A35DAB0785"
"OwnerKey" = "8:_12FE3AC54ED17E0AB1007324ABFD58D1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_9B3B11113C57483FCBDDB37CB3ED5F37"
"OwnerKey" = "8:_C3161A936F4192497A0972C3EC781BF6"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
"OwnerKey" = "8:_15F0BD9071B5889215577FD20EC63766"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_591351D571FEB540A92347F0F74B55CE"
"OwnerKey" = "8:_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
"MsmSig" = "8:_UNDEFINED"
}
}
Expand Down Expand Up @@ -321,11 +321,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_12FE3AC54ED17E0AB1007324ABFD58D1"
{
"Name" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime.dll"
"TargetName" = "8:"
Expand All @@ -352,11 +347,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_133D4E0B8AD91071625356F7F9F22C66"
{
"Name" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll"
"TargetName" = "8:"
Expand All @@ -383,11 +373,6 @@
"AssemblyAsmDisplayName" = "8:EasyHook, Version=2.7.6578.0, Culture=neutral, PublicKeyToken=4b580fca19d0b0c5, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_15F0BD9071B5889215577FD20EC63766"
{
"Name" = "8:EasyHook.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:EasyHook.dll"
"TargetName" = "8:"
Expand All @@ -414,11 +399,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Outlook, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_3DBBABF7C43171A6F7B4D8D682699556"
{
"Name" = "8:Microsoft.Office.Tools.Outlook.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.Outlook.dll"
"TargetName" = "8:"
Expand All @@ -445,11 +425,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_5575AAAA0CAC3763D8DCDDD642FBD25F"
{
"Name" = "8:Microsoft.Office.Tools.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.dll"
"TargetName" = "8:"
Expand All @@ -476,11 +451,6 @@
"AssemblyAsmDisplayName" = "8:stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
"ScatterAssemblies"
{
"_591351D571FEB540A92347F0F74B55CE"
{
"Name" = "8:stdole.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:stdole.dll"
"TargetName" = "8:"
Expand Down Expand Up @@ -527,11 +497,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_9B3B11113C57483FCBDDB37CB3ED5F37"
{
"Name" = "8:Microsoft.Office.Tools.Common.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.Common.dll"
"TargetName" = "8:"
Expand Down Expand Up @@ -578,11 +543,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_BB365CE8FF8B85A3589349A35DAB0785"
{
"Name" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
"TargetName" = "8:"
Expand All @@ -609,11 +569,6 @@
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_C3161A936F4192497A0972C3EC781BF6"
{
"Name" = "8:Microsoft.Office.Tools.v4.0.Framework.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Tools.v4.0.Framework.dll"
"TargetName" = "8:"
Expand All @@ -640,11 +595,6 @@
"AssemblyAsmDisplayName" = "8:log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
{
"Name" = "8:log4net.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:log4net.dll"
"TargetName" = "8:"
Expand Down Expand Up @@ -740,15 +690,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Outlook File Drag"
"ProductCode" = "8:{FF7FBAEC-CA4F-4E26-BF99-93D76C70FB21}"
"PackageCode" = "8:{C17F05A5-D68C-4727-B599-3B3D9BE419A5}"
"ProductCode" = "8:{26BD860F-7DBB-4B2E-A9BC-270FBD780E7E}"
"PackageCode" = "8:{D2323604-720F-4756-89CC-8D8B77F20ABC}"
"UpgradeCode" = "8:{2F626147-8F83-4FC1-9190-32AA4F25D487}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:TRUE"
"ProductVersion" = "8:1.0.2"
"ProductVersion" = "8:1.0.3"
"Manufacturer" = "8:Tony Federer"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
Loading

0 comments on commit afc8c35

Please sign in to comment.