Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: CoCreateInstance fails depending on exe name



I've taken a closer "peak" into QuickTime Control dll, and the control is
clearly checking whether the host is "iexplore.exe", "firefox.exe", or
"mozilla.exe". I'm still not sure why it CoCreateInstance fails though.

I'd be much obliged if someone from Apple could comment on this. My app
supports Windows Media Player and Flash, and I'd really like to support
QuickTime as well. Right now it doesn't appear to be possible.

Thanks,
Sean

Sean Draine, Ph.D.
Millisecond Software LLC
1910 E. Jefferson St.
Seattle, WA 98122
FAX: 206-260-7955
EMAIL: email@hidden
WEB: http://www.millisecond.com 

-----Original Message-----
From: quicktime-api-bounces+seandr=email@hidden
[mailto:quicktime-api-bounces+seandr=email@hidden] On
Behalf Of Sean Draine
Sent: Thursday, June 22, 2006 3:15 PM
To: email@hidden
Subject: CoCreateInstance fails depending on exe name


Hello,

I have an app packaged as an ActiveX control that can be hosted in Internet
Explorer. My ActiveX control in turn uses the Apple QuickTime Control 2.0.
When my app tries to create the QuickTime Control using CoCreateInstance, it
fails depending on the name of the host executable.

Specifically, here's what I've observed

1) When my control is hosted by Internet Explorer, CoCreateInstance fails
returning ERROR_DLL_INIT_FAILED. 
2) When my control is hosted by Internet Explorer with the exe renamed to
something else (e.g., "iexplore_test.exe"), CoCreateInstance returns
successfully. 
3) When my control is hosted by a test harness app named "test.exe",
CoCreateInstance returns successfully.
4) If I rename my test harness to "iexplore.exe", CoCreateInstance fails
with ERROR_DLL_INIT_FAILED. 

It appears the QuickTime Control checks if the name of the host exe is
"iexplore.exe", then attempts some special logic that fails unless IE is
creating the control directly. 	

Can anyone shed some light on this and tell me how can I make this scenario
work?

For reference, here's my code:

CLSID clsid = { 0x24ba3caf, 0x4be8, 0x4aec, { 0xa7, 0xc8, 0x6f, 0x47, 0xd5,
0x68, 0x46, 0x2 } };
LPOLEOBJECT pObject = NULL;
hr = CoCreateInstance(clsid, 
	NULL, 
	CLSCTX_INPROC_SERVER,
	IID_IOleObject, 
	(void**)&pObject);

Thanks in advance,
Sean		

Sean Draine, Ph.D.
Millisecond Software LLC
1910 E. Jefferson St.
Seattle, WA 98122
FAX: 206-260-7955
EMAIL: email@hidden
WEB: http://www.millisecond.com 




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden
m

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden

References: 
 >CoCreateInstance fails depending on exe name (From: "Sean Draine" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.