COM.CoCreateInstance(...) crashes [message #762185] |
Wed, 07 December 2011 12:03  |
Eclipse User |
|
|
|
I'm trying to fix a VSS plugin for eclipse so that it runs on a 64-bit machine. I've traced an issue down to a failed call to COM.CoCreateInstance(...).
I can't find any documentation on this method.
Originally, the method was being passed the following arguments:
int[] ppv = new int[1];
COM.CoCreateInstance(guid, 0, COM.CLSCTX_INPROC_HANDLER | COM.CLSCTX_INPROC_SERVER,
COM.IIDIDispatch, ppv);
Eclipse reported a compilation error: the last argument needed to be changed to long[], so I changed ppv's type.
The method call populates ppv with a 0 and result with a strange value like '-2147221164'. The call is supposed to return a 0 if successful.
Does anyone have some insight into this issue? Is there updated documentation for this class?
|
|
|
Re: COM.CoCreateInstance(...) crashes [message #762738 is a reply to message #762185] |
Thu, 08 December 2011 10:06   |
Eclipse User |
|
|
|
For info on CoCreateInstance() see
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686615%28v=vs.85%29.aspx
..
Return code -2147221164 == 0x80040154 == REGDB_E_CLASSNOTREG. If your
plugin successfully makes this call on this same machine when running
eclipse/swt as a 32-bit app but is failing for you when running
eclipse/swt as a 64-bit app then my guess is that the COM component
you're trying to instantiate is only registered on your machine in a
32-bit .dll/.exe, but a 64-bit compilation of it is needed.
HTH,
Grant
On 12/7/2011 12:03 PM, Kyle Ouellette wrote:
> I'm trying to fix a VSS plugin for eclipse so that it runs on a 64-bit
> machine. I've traced an issue down to a failed call to
> COM.CoCreateInstance(...).
>
> I can't find any documentation on this method.
>
> Originally, the method was being passed the following arguments:
>
> int[] ppv = new int[1];
> COM.CoCreateInstance(guid, 0, COM.CLSCTX_INPROC_HANDLER |
> COM.CLSCTX_INPROC_SERVER,
> COM.IIDIDispatch, ppv);
>
> Eclipse reported a compilation error: the last argument needed to be
> changed to long[], so I changed ppv's type.
>
> The method call populates ppv with a 0 and result with a strange value
> like '-2147221164'. The call is supposed to return a 0 if successful.
>
> Does anyone have some insight into this issue? Is there updated
> documentation for this class?
|
|
|
|
|
|
Re: COM.CoCreateInstance(...) crashes [message #774277 is a reply to message #771955] |
Tue, 03 January 2012 11:17  |
Eclipse User |
|
|
|
Process Monitor from MS (
http://technet.microsoft.com/en-us/sysinternals/bb896645 ) may be
helpful, as it logs all registry activity. I'm not sure if it would log
an attempt to open a non-existent registry key, but even if it doesn't,
it should provide some insight regarding what is happening under the
covers (eg.- you could compare the registry interactions in your 32-bit
working case with the 64-bit case).
Grant
On 12/28/2011 11:31 AM, Kyle Ouellette wrote:
> Thanks for your reply, Grant.
>
> Unfortunately for me and a few of the people that have replied to that
> blog posting, this registry hack doesn't do the trick.
>
> Does anyone know of any tools/documentation I could use to get a better
> idea at how the GUID lookup is being done and exactly where it's failing?
|
|
|
Powered by
FUDForum. Page generated in 1.04787 seconds