sutex / lcdmiscellany

Automatically exported from code.google.com/p/lcdmiscellany
0 stars 0 forks source link

iTunes plugin issue #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please describe the problem:
When LCDMisc attempts to initialize iTunes, CoCreateInstance returns 
0x80080005, and no track info is displayed/lcdmisc hangs.

What version of the product are you using? On what operating system?

Windows 7 x64
latest LCDMiscellany x64

Original issue reported on code.google.com by gene....@gmail.com on 4 Dec 2010 at 11:23

GoogleCodeExporter commented 9 years ago
I'd blame this on iTunes or Windows.  When CoCreateInstance fails, not a whole 
lot I can do, as far as I know.

Original comment by mattme...@gmail.com on 4 Dec 2010 at 11:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A simple test with the following console application works, successfully 
pausing the current track:

#include "iTunesCOMInterface.h"

int main()
{
    CoInitialize(NULL);

    HRESULT  hRes;
    IiTunes* iITunes;

    // note - CLSID_iTunesApp and IID_IiTunes are defined in iTunesCOMInterface_i.c
    hRes = ::CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, IID_IiTunes, (PVOID *)&iITunes);

    iITunes->Pause();
    return 0;
}

Original comment by gene....@gmail.com on 4 Dec 2010 at 11:56

GoogleCodeExporter commented 9 years ago
Hmm...  That's odd.  I assume you've tried recompiling my iTunes dll.  I'd 
expect a versioning issue to return a different error, but you never know.  I'm 
not sure what to suggest.

It's been a while since I added iTunes support, and I don't use iTunes myself.  
Haven't been messing with LCD Miscellany at all lately, either.  As a result, 
it's rather unlikely that I'll ever get around to looking into this.

Original comment by mattme...@gmail.com on 5 Dec 2010 at 12:14

GoogleCodeExporter commented 9 years ago
Yes, I've recompiled the iTunes DLL with the latest COM interface for iTunes.
I'd really like to get this working, as I've used it a lot back when I was on 
x86.
Right now I'm reading up on COM... any help would be greatly appreciated!

Original comment by gene....@gmail.com on 5 Dec 2010 at 12:17

GoogleCodeExporter commented 9 years ago
I really don't know COM well, unfortunately.  The call to CoInitialize() in the 
dll is succeeding, right?

Suppose could be a result of stack corruption, but sounds too consistent for 
that.

Have you tried the 32-bit version of LCD Miscellany?

Original comment by mattme...@gmail.com on 5 Dec 2010 at 1:33

GoogleCodeExporter commented 9 years ago
Yes, I've tried both variants to no avail.

CoInitialize is always returning S_FALSE, which means that the COM instance is 
already initialized.  Even calling CoUninitialize before init yields the same 
issue...

Original comment by gene....@gmail.com on 5 Dec 2010 at 1:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have tracked down the issue...
In the release build of LCDMisc, the Character Set is undefined, when it should 
be Multi-Byte Character Set.

Weird I know, but this seems to fix the error for me!

Original comment by gene....@gmail.com on 5 Dec 2010 at 3:26

GoogleCodeExporter commented 9 years ago
Funky...Where's the option for that?  And how the heck did you figure that out? 
 :)

Original comment by mattme...@gmail.com on 5 Dec 2010 at 3:49

GoogleCodeExporter commented 9 years ago
I don't even know, I just tried a whole bunch of different compile options.
It's under Project Settings -> Configuration Properties -> General -> Character 
Set

"Use Multi-Byte Character Set"

Original comment by gene....@gmail.com on 5 Dec 2010 at 3:51

GoogleCodeExporter commented 9 years ago

Original comment by mattme...@gmail.com on 5 Dec 2010 at 4:56