View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001776 | Double Commander | File operations | public | 2017-03-21 15:10 | 2020-11-30 07:43 |
Reporter | douchecommander | Assigned To | Alexx2000 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Projection | none | ETA | none | ||
OS | Windows 7 x64 | ||||
Product Version | 1.0.0 (trunk) | Product Build | 7469 | ||
Target Version | 0.8.0 | Fixed in Version | 0.8.0 | ||
Summary | 0001776: Filenames not passed on correctly to MP3Tag | ||||
Description | I am using MP3Tag (http://www.mp3tag.de/) for tagging audio files. It integrates itself into the Explorer context menu so that you can right-click a file in Explorer and choose "MP3Tag" to open this file. When doing so in Explorer, it works just fine. When using the Explorer context menu in DoubleCommander, however, the filename is apparently not passed on correctly to MP3Tag, leading to an error message about an invalid parameter. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in Revision | |||||
Operating system | Windows | ||||
Widgetset | Win32 | ||||
Architecture | 64-bit | ||||
|
I can confirm this issue. It used to work until recently so there must have been some kind of change in one of the snapshots that has introduced this issue. It still does not work in the latest snapshot (revision 7500). It works flawlessly in the stable version though. I also added a screenshot documenting the issue. |
|
I know which change broken it, but I don't know why. I do not see mistake in new code. Other programs works fine, only MP3Tag doesn't work. |
|
Maybe you can point to the change in code, in case someone else has an idea. |
|
https://sourceforge.net/p/doublecmd/code/7456/ |
|
cmici: TCMInvokeCommandInfoEx; lpici: TCMINVOKECOMMANDINFO absolute cmici; This was probably a bad idea: TCMINVOKECOMMANDINFO is defined as packed record in shlobj.pp, but TCMInvokeCommandInfoEx is not packed (a bug in the winunits-base package?) |
|
This record has such structure that it has same size in packed and unpacked variants. Both records has correct size 36 and 64 bytes under Win32. |
|
OK, then maybe the reason is fMask := CMIC_MASK_UNICODE; It is supposed to be used with the Ex version, but non-Ex record is passed by value, not by reference. Or is it? |
|
I'm probably wrong with that, it should be by reference, there is "var". Maybe just try it with compiler optimizations disabled? |
|
Yes, it should be by reference, because "var". I checked with debug build without optimizations. Author of MP3Tag can say what is wrong. May be someone ask him at support forum. |
|
Report at MP3Tag forum: https://forums.mp3tag.de/index.php?showtopic=22498 |
|
It has to be something with lpVerb/lpVerbW - everything else looks flawless. MSDN says about lpVerb: Alternatively, rather than a pointer, this parameter can be MAKEINTRESOURCE(offset) where offset is the menu-identifier offset of the command to carry out. Maybe try it this way, as suggested in http://stackoverflow.com/a/3783104 lpVerb := MakeIntResource(Word(cmd - 1)) |
|
From FreePascal source: MakeIntResourceA = PAnsiChar; MakeIntResourceW = PWideChar; So it is same as current code. MP3Tag does not like CMIC_MASK_UNICODE flag. But I don't know why. If it does not support Unicode then it must ignore it and use TCMINVOKECOMMANDINFO part of structure. |
|
I created simple shell extension and debug it. Looks like lpVerbW parameter cannot be MAKEINTRESOURCE(offset). It can be a string only. |
|
Using my shell extension I checked which parameters Explorer pass to shell extension. I found that it does not fill lpVerbW parameter. So I made in same manner. |
|
I've also found this in How to Implement the IContextMenu Interface at MSDN: The structure's lpVerb or lpVerbW member is used to identify the command to be executed. Commands are identified in one of the following two ways: By the command's verb string By the command's identifier offset To distinguish between these two cases, check the high-order word of lpVerb for the ANSI case or lpVerbW for the Unicode case. If the high-order word is nonzero, lpVerb or lpVerbW holds a verb string. If the high-order word is zero, the command offset is in the low-order word of lpVerb. Does it confirm that the bug is in the MP3Tag's implementation? |
|
It seems that way... Link: https://msdn.microsoft.com/en-us/library/windows/desktop/hh127443(v=vs.85).aspx |
|
In the latest snapshot it works again. Thank you very much for your efforts, well done! |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-21 15:10 | douchecommander | New Issue | |
2017-04-09 11:16 | Alexx2000 | Target Version | => 0.8.0 |
2017-04-18 01:58 | altae | File Added: Error_MP3Tag.jpg | |
2017-04-18 01:59 | altae | Note Added: 0002162 | |
2017-05-13 18:48 | Alexx2000 | Note Added: 0002208 | |
2017-05-13 18:48 | Alexx2000 | Status | new => acknowledged |
2017-05-13 22:26 | douchecommander | Note Added: 0002210 | |
2017-05-13 22:29 | Alexx2000 | Note Added: 0002211 | |
2017-05-13 23:33 | cordylus | Note Added: 0002212 | |
2017-05-13 23:35 | cordylus | Note Edited: 0002212 | |
2017-05-13 23:35 | cordylus | Note Edited: 0002212 | |
2017-05-14 00:18 | Alexx2000 | Note Added: 0002213 | |
2017-05-14 00:23 | cordylus | Note Added: 0002214 | |
2017-05-14 00:26 | cordylus | Note Edited: 0002214 | |
2017-05-14 00:31 | cordylus | Note Edited: 0002214 | |
2017-05-14 00:41 | cordylus | Note Added: 0002215 | |
2017-05-14 01:00 | Alexx2000 | Note Added: 0002216 | |
2017-05-14 02:23 | douchecommander | Note Added: 0002217 | |
2017-05-14 02:33 | cordylus | Note Added: 0002218 | |
2017-05-14 11:12 | Alexx2000 | Note Added: 0002219 | |
2017-05-14 14:12 | Alexx2000 | Note Added: 0002222 | |
2017-05-14 15:24 | Alexx2000 | Note Added: 0002223 | |
2017-05-14 15:24 | Alexx2000 | Assigned To | => Alexx2000 |
2017-05-14 15:24 | Alexx2000 | Status | acknowledged => resolved |
2017-05-14 15:24 | Alexx2000 | Resolution | open => fixed |
2017-05-14 15:24 | Alexx2000 | Fixed in Version | => 0.8.0 |
2017-05-14 20:11 | cordylus | Note Added: 0002225 | |
2017-05-15 07:00 | Alexx2000 | Note Added: 0002227 | |
2017-05-15 07:00 | Alexx2000 | Note Edited: 0002227 | |
2017-05-25 00:14 | altae | Note Added: 0002254 | |
2020-11-30 07:43 | Alexx2000 | Status | resolved => closed |