Skip to content

Commit afc8c35

Browse files
committed
Fix issue that prevented dragging items from one group to another
1 parent f6ba459 commit afc8c35

File tree

4 files changed

+73
-131
lines changed

4 files changed

+73
-131
lines changed

OutlookFileDrag/OutlookDataObject.cs

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace OutlookFileDrag
99
{
1010
//Class that wraps Outlook data object and adds support for CF_HDROP format
11-
class OutlookDataObject : NativeMethods.IDataObject
11+
class OutlookDataObject : NativeMethods.IDataObject, ICustomQueryInterface
1212
{
1313
private NativeMethods.IDataObject innerData;
1414
private string[] tempFilenames;
@@ -267,5 +267,44 @@ private void ExtractFiles()
267267
}
268268
}
269269

270+
public CustomQueryInterfaceResult GetInterface(ref Guid iid, out IntPtr ppv)
271+
{
272+
ppv = IntPtr.Zero;
273+
try
274+
{
275+
log.DebugFormat("Get COM interface {0}", iid);
276+
277+
//For IDropSource interface, use interface on this object
278+
if (iid == new Guid("0000010E-0000-0000-C000-000000000046"))
279+
{
280+
log.DebugFormat("Interface handled");
281+
return CustomQueryInterfaceResult.NotHandled;
282+
}
283+
284+
else
285+
{
286+
//For all other interfaces, use interface on original object
287+
IntPtr pUnk = Marshal.GetIUnknownForObject(this.innerData);
288+
int retVal = Marshal.QueryInterface(pUnk, ref iid, out ppv);
289+
if (retVal == NativeMethods.S_OK)
290+
{
291+
log.DebugFormat("Interface handled by inner object");
292+
return CustomQueryInterfaceResult.Handled;
293+
}
294+
else
295+
{
296+
log.DebugFormat("Interface not handled by inner object");
297+
return CustomQueryInterfaceResult.Failed;
298+
}
299+
}
300+
301+
}
302+
catch (Exception ex)
303+
{
304+
log.Error("Exception in ICustomQueryInterface", ex);
305+
return CustomQueryInterfaceResult.Failed;
306+
}
307+
308+
}
270309
}
271310
}

OutlookFileDragSetup/OutlookFileDragSetup.vdproj

Lines changed: 15 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@
6464
"Entry"
6565
{
6666
"MsmKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
67-
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
67+
"OwnerKey" = "8:_54EF5F74A56C4AEE96D4330B540B4A3A"
6868
"MsmSig" = "8:_UNDEFINED"
6969
}
7070
"Entry"
7171
{
7272
"MsmKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
73-
"OwnerKey" = "8:_54EF5F74A56C4AEE96D4330B540B4A3A"
73+
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
7474
"MsmSig" = "8:_UNDEFINED"
7575
}
7676
"Entry"
@@ -142,61 +142,61 @@
142142
"Entry"
143143
{
144144
"MsmKey" = "8:_UNDEFINED"
145-
"OwnerKey" = "8:_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
145+
"OwnerKey" = "8:_591351D571FEB540A92347F0F74B55CE"
146146
"MsmSig" = "8:_UNDEFINED"
147147
}
148148
"Entry"
149149
{
150150
"MsmKey" = "8:_UNDEFINED"
151-
"OwnerKey" = "8:_15F0BD9071B5889215577FD20EC63766"
151+
"OwnerKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
152152
"MsmSig" = "8:_UNDEFINED"
153153
}
154154
"Entry"
155155
{
156156
"MsmKey" = "8:_UNDEFINED"
157-
"OwnerKey" = "8:_C3161A936F4192497A0972C3EC781BF6"
157+
"OwnerKey" = "8:_9B3B11113C57483FCBDDB37CB3ED5F37"
158158
"MsmSig" = "8:_UNDEFINED"
159159
}
160160
"Entry"
161161
{
162162
"MsmKey" = "8:_UNDEFINED"
163-
"OwnerKey" = "8:_12FE3AC54ED17E0AB1007324ABFD58D1"
163+
"OwnerKey" = "8:_BB365CE8FF8B85A3589349A35DAB0785"
164164
"MsmSig" = "8:_UNDEFINED"
165165
}
166166
"Entry"
167167
{
168168
"MsmKey" = "8:_UNDEFINED"
169-
"OwnerKey" = "8:_133D4E0B8AD91071625356F7F9F22C66"
169+
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
170170
"MsmSig" = "8:_UNDEFINED"
171171
}
172172
"Entry"
173173
{
174174
"MsmKey" = "8:_UNDEFINED"
175-
"OwnerKey" = "8:_3DBBABF7C43171A6F7B4D8D682699556"
175+
"OwnerKey" = "8:_133D4E0B8AD91071625356F7F9F22C66"
176176
"MsmSig" = "8:_UNDEFINED"
177177
}
178178
"Entry"
179179
{
180180
"MsmKey" = "8:_UNDEFINED"
181-
"OwnerKey" = "8:_BB365CE8FF8B85A3589349A35DAB0785"
181+
"OwnerKey" = "8:_12FE3AC54ED17E0AB1007324ABFD58D1"
182182
"MsmSig" = "8:_UNDEFINED"
183183
}
184184
"Entry"
185185
{
186186
"MsmKey" = "8:_UNDEFINED"
187-
"OwnerKey" = "8:_9B3B11113C57483FCBDDB37CB3ED5F37"
187+
"OwnerKey" = "8:_C3161A936F4192497A0972C3EC781BF6"
188188
"MsmSig" = "8:_UNDEFINED"
189189
}
190190
"Entry"
191191
{
192192
"MsmKey" = "8:_UNDEFINED"
193-
"OwnerKey" = "8:_5575AAAA0CAC3763D8DCDDD642FBD25F"
193+
"OwnerKey" = "8:_15F0BD9071B5889215577FD20EC63766"
194194
"MsmSig" = "8:_UNDEFINED"
195195
}
196196
"Entry"
197197
{
198198
"MsmKey" = "8:_UNDEFINED"
199-
"OwnerKey" = "8:_591351D571FEB540A92347F0F74B55CE"
199+
"OwnerKey" = "8:_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
200200
"MsmSig" = "8:_UNDEFINED"
201201
}
202202
}
@@ -321,11 +321,6 @@
321321
"AssemblyAsmDisplayName" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
322322
"ScatterAssemblies"
323323
{
324-
"_12FE3AC54ED17E0AB1007324ABFD58D1"
325-
{
326-
"Name" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime.dll"
327-
"Attributes" = "3:512"
328-
}
329324
}
330325
"SourcePath" = "8:Microsoft.VisualStudio.Tools.Applications.Runtime.dll"
331326
"TargetName" = "8:"
@@ -352,11 +347,6 @@
352347
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
353348
"ScatterAssemblies"
354349
{
355-
"_133D4E0B8AD91071625356F7F9F22C66"
356-
{
357-
"Name" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll"
358-
"Attributes" = "3:512"
359-
}
360350
}
361351
"SourcePath" = "8:Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll"
362352
"TargetName" = "8:"
@@ -383,11 +373,6 @@
383373
"AssemblyAsmDisplayName" = "8:EasyHook, Version=2.7.6578.0, Culture=neutral, PublicKeyToken=4b580fca19d0b0c5, processorArchitecture=MSIL"
384374
"ScatterAssemblies"
385375
{
386-
"_15F0BD9071B5889215577FD20EC63766"
387-
{
388-
"Name" = "8:EasyHook.dll"
389-
"Attributes" = "3:512"
390-
}
391376
}
392377
"SourcePath" = "8:EasyHook.dll"
393378
"TargetName" = "8:"
@@ -414,11 +399,6 @@
414399
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Outlook, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
415400
"ScatterAssemblies"
416401
{
417-
"_3DBBABF7C43171A6F7B4D8D682699556"
418-
{
419-
"Name" = "8:Microsoft.Office.Tools.Outlook.dll"
420-
"Attributes" = "3:512"
421-
}
422402
}
423403
"SourcePath" = "8:Microsoft.Office.Tools.Outlook.dll"
424404
"TargetName" = "8:"
@@ -445,11 +425,6 @@
445425
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
446426
"ScatterAssemblies"
447427
{
448-
"_5575AAAA0CAC3763D8DCDDD642FBD25F"
449-
{
450-
"Name" = "8:Microsoft.Office.Tools.dll"
451-
"Attributes" = "3:512"
452-
}
453428
}
454429
"SourcePath" = "8:Microsoft.Office.Tools.dll"
455430
"TargetName" = "8:"
@@ -476,11 +451,6 @@
476451
"AssemblyAsmDisplayName" = "8:stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
477452
"ScatterAssemblies"
478453
{
479-
"_591351D571FEB540A92347F0F74B55CE"
480-
{
481-
"Name" = "8:stdole.dll"
482-
"Attributes" = "3:512"
483-
}
484454
}
485455
"SourcePath" = "8:stdole.dll"
486456
"TargetName" = "8:"
@@ -527,11 +497,6 @@
527497
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
528498
"ScatterAssemblies"
529499
{
530-
"_9B3B11113C57483FCBDDB37CB3ED5F37"
531-
{
532-
"Name" = "8:Microsoft.Office.Tools.Common.dll"
533-
"Attributes" = "3:512"
534-
}
535500
}
536501
"SourcePath" = "8:Microsoft.Office.Tools.Common.dll"
537502
"TargetName" = "8:"
@@ -578,11 +543,6 @@
578543
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
579544
"ScatterAssemblies"
580545
{
581-
"_BB365CE8FF8B85A3589349A35DAB0785"
582-
{
583-
"Name" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
584-
"Attributes" = "3:512"
585-
}
586546
}
587547
"SourcePath" = "8:Microsoft.Office.Tools.Common.v4.0.Utilities.dll"
588548
"TargetName" = "8:"
@@ -609,11 +569,6 @@
609569
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Tools.v4.0.Framework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
610570
"ScatterAssemblies"
611571
{
612-
"_C3161A936F4192497A0972C3EC781BF6"
613-
{
614-
"Name" = "8:Microsoft.Office.Tools.v4.0.Framework.dll"
615-
"Attributes" = "3:512"
616-
}
617572
}
618573
"SourcePath" = "8:Microsoft.Office.Tools.v4.0.Framework.dll"
619574
"TargetName" = "8:"
@@ -640,11 +595,6 @@
640595
"AssemblyAsmDisplayName" = "8:log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"
641596
"ScatterAssemblies"
642597
{
643-
"_CE28E7CBCA9C5EDB3BD3A2F1F2116DF9"
644-
{
645-
"Name" = "8:log4net.dll"
646-
"Attributes" = "3:512"
647-
}
648598
}
649599
"SourcePath" = "8:log4net.dll"
650600
"TargetName" = "8:"
@@ -740,15 +690,15 @@
740690
{
741691
"Name" = "8:Microsoft Visual Studio"
742692
"ProductName" = "8:Outlook File Drag"
743-
"ProductCode" = "8:{FF7FBAEC-CA4F-4E26-BF99-93D76C70FB21}"
744-
"PackageCode" = "8:{C17F05A5-D68C-4727-B599-3B3D9BE419A5}"
693+
"ProductCode" = "8:{26BD860F-7DBB-4B2E-A9BC-270FBD780E7E}"
694+
"PackageCode" = "8:{D2323604-720F-4756-89CC-8D8B77F20ABC}"
745695
"UpgradeCode" = "8:{2F626147-8F83-4FC1-9190-32AA4F25D487}"
746696
"AspNetVersion" = "8:4.0.30319.0"
747697
"RestartWWWService" = "11:FALSE"
748698
"RemovePreviousVersions" = "11:TRUE"
749699
"DetectNewerInstalledVersion" = "11:TRUE"
750700
"InstallAllUsers" = "11:TRUE"
751-
"ProductVersion" = "8:1.0.2"
701+
"ProductVersion" = "8:1.0.3"
752702
"Manufacturer" = "8:Tony Federer"
753703
"ARPHELPTELEPHONE" = "8:"
754704
"ARPHELPLINK" = "8:"

0 commit comments

Comments
 (0)