How to get GetObject / moniker resolution to work on XPe?

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

I hope somebody resolved this already.
We have an application (exe) that is being started via
CoGetObject(...). It always fails on XPe with error error 0x800401e4 -
Invalid Syntax. The moniker used is in form of
'clsid:xxxxx-xxx....-xxx:'. What subsystem is missing that is
responsible for parsing monikers starting with 'clsid:'? Our other
components that are regular COM dlls, COM servers and services are
running OK. Only this one, using moniker semantics does not.
We don't have much time on our project left to keep trying to include
various stuff.

I'd really appreciate some help here. Getting desperate.

Thanks,
Alex
 
Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and deploy it
again.
- manually add ole2disp.dll to your image (will bring in necessary PSSupportErrorInfo interface). Again, no component in XPe
repository that holds the dll.

That is all I can think of right now.

Also, you may get a better reply in microsoft.public.win32.programmer.ole newsgroup.
 
Hmm.. guess that was too early compliment to the thread. There was no resolution except restoring ClassMoniker registry which is
unlikely on XPe (unless someone intentionally removed the key and that's why I mentioned it on my list).

Anyway.. good to know that someone has already hit the problem.

It appeared that the problem has been even discussed in this NG:
http://groups.google.com/groups?hl=...km=#[email protected]#link1.
Interesting, I did not know that ole2disp.dll cannot be registered. I checked, it does not even have a 32 bit PE file signature. It
is a 16-bit file but still required for OLE automation. Legacy stuff.
 
Hi Konstantin,
Hmm.. guess that was too early compliment to the thread. There was no resolution except restoring ClassMoniker registry which is
unlikely on XPe (unless someone intentionally removed the key and that's why I mentioned it on my list).

I know, I just gave this link since there are few useful info in it.

Best regards,
Slobodan
 
Thanks a lot for all your suggestions. Unfortunately it still does not
work.

- I have tested my app on XPPro and W2K. It works there.
- I do call CoInitialize()
- Primitive OLE32 is on the image
- COM+ services component is included
- ClassMoniker CLSID
[HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}] does exist
- Added ole2disp.dll. Regsvr32 would not register it (16 bit app?).
Compared registry keys where this dll is referenced on XPPro and XPe.
Added following manually:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}]
@="PSSupportErrorInfo"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer]
@="ole2disp.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer32]
@="oleaut32.dll"

None of this helped.

I've created simple test client and replaced CoGetObject() with what
it does internally. Failure occures in MkParseDisplayName(). See
output and code below:

Step 1. Succeeded
Step 2. Succeeded
Step 3. COM error occured. HRESULT = 0x800401E4. Error: Invalid syntax

int main(int argc, char* argv[])
{
CHR(CoInitialize(0));

IBindCtx *pbc=NULL;
CHR(CreateBindCtx(0, &pbc));

ULONG cchEaten=0;
IMoniker *pmk=NULL;

CHR(MkParseDisplayName(pbc,
OLESTR("clsid:141D07D5-286D-4CD3-B41A-3428D9975C04:"), &cchEaten,
&pmk));

IUnknown *punk=NULL;
CHR(pmk->BindToObject(pbc, 0, IID_IUnknown, (void**)&punk));

_tprintf(_T("Test has succeeded\n"));

punk->Release();

pmk->Release();

pbc->Release();

CoUninitialize();

return 0;
}

void CHR(HRESULT hr)
{
static unsigned step = 0;
step++;
if (hr!=S_OK)
{
_tprintf(_T("Step %u. COM error occured. HRESULT = 0x%0X. Error:
%s\n"), step, hr, _com_error(hr).ErrorMessage());
}
else
{
_tprintf(_T("Step %u. Succeeded\n"), step);
}

if (FAILED(hr)) exit(0);
}

Any ideas?

KM said:
Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and deploy it
again.
- manually add ole2disp.dll to your image (will bring in necessary PSSupportErrorInfo interface). Again, no component in XPe
repository that holds the dll.

That is all I can think of right now.

Also, you may get a better reply in microsoft.public.win32.programmer.ole newsgroup.

--
Regards,
KM, BSquare Corp.

I hope somebody resolved this already.
We have an application (exe) that is being started via
CoGetObject(...). It always fails on XPe with error error 0x800401e4 -
Invalid Syntax. The moniker used is in form of
'clsid:xxxxx-xxx....-xxx:'. What subsystem is missing that is
responsible for parsing monikers starting with 'clsid:'? Our other
components that are regular COM dlls, COM servers and services are
running OK. Only this one, using moniker semantics does not.
We don't have much time on our project left to keep trying to include
various stuff.

I'd really appreciate some help here. Getting desperate.

Thanks,
Alex
 
Alex,

More suggestions to test the issue:
- Use MkParseDisplayNameEx. This function differs from the MkParseDisplayName function in that it supports extended syntax.
- After the MkParseDisplayName/MkParseDisplayNameEx failure analyze pcchEaten parameter (3rd parameter). It should indicate and
return how much of the string was successfully parsed.
- Try to create (parse) a *native* moniker. E.g., a File or URL Moniker ("http:...", "file:..."). See MSDN on the exact syntax.
- Try XPProEmulation image (www.xpefiles.com, Development Utilities/Main folder). See if your test app work there.
- Use Regmon (and maybe Filemon too) to see why MkParseDisplayName/MkParseDisplayNameEx fails. You can get pretty clean log if
you break just before the API call and then stop logging right after the API call.

KM

--
Regards,
KM, BSquare Corp.

Thanks a lot for all your suggestions. Unfortunately it still does not
work.

- I have tested my app on XPPro and W2K. It works there.
- I do call CoInitialize()
- Primitive OLE32 is on the image
- COM+ services component is included
- ClassMoniker CLSID
[HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}] does exist
- Added ole2disp.dll. Regsvr32 would not register it (16 bit app?).
Compared registry keys where this dll is referenced on XPPro and XPe.
Added following manually:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}]
@="PSSupportErrorInfo"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer]
@="ole2disp.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer32]
@="oleaut32.dll"

None of this helped.

I've created simple test client and replaced CoGetObject() with what
it does internally. Failure occures in MkParseDisplayName(). See
output and code below:

Step 1. Succeeded
Step 2. Succeeded
Step 3. COM error occured. HRESULT = 0x800401E4. Error: Invalid syntax

int main(int argc, char* argv[])
{
CHR(CoInitialize(0));

IBindCtx *pbc=NULL;
CHR(CreateBindCtx(0, &pbc));

ULONG cchEaten=0;
IMoniker *pmk=NULL;

CHR(MkParseDisplayName(pbc,
OLESTR("clsid:141D07D5-286D-4CD3-B41A-3428D9975C04:"), &cchEaten,
&pmk));

IUnknown *punk=NULL;
CHR(pmk->BindToObject(pbc, 0, IID_IUnknown, (void**)&punk));

_tprintf(_T("Test has succeeded\n"));

punk->Release();

pmk->Release();

pbc->Release();

CoUninitialize();

return 0;
}

void CHR(HRESULT hr)
{
static unsigned step = 0;
step++;
if (hr!=S_OK)
{
_tprintf(_T("Step %u. COM error occured. HRESULT = 0x%0X. Error:
%s\n"), step, hr, _com_error(hr).ErrorMessage());
}
else
{
_tprintf(_T("Step %u. Succeeded\n"), step);
}

if (FAILED(hr)) exit(0);
}

Any ideas?

KM said:
Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and deploy it
again.
- manually add ole2disp.dll to your image (will bring in necessary PSSupportErrorInfo interface). Again, no component in XPe
repository that holds the dll.

That is all I can think of right now.

Also, you may get a better reply in microsoft.public.win32.programmer.ole newsgroup.

--
Regards,
KM, BSquare Corp.

I hope somebody resolved this already.
We have an application (exe) that is being started via
CoGetObject(...). It always fails on XPe with error error 0x800401e4 -
Invalid Syntax. The moniker used is in form of
'clsid:xxxxx-xxx....-xxx:'. What subsystem is missing that is
responsible for parsing monikers starting with 'clsid:'? Our other
components that are regular COM dlls, COM servers and services are
running OK. Only this one, using moniker semantics does not.
We don't have much time on our project left to keep trying to include
various stuff.

I'd really appreciate some help here. Getting desperate.

Thanks,
Alex
 
Alex,

At first place I forgot to ask you to check if [HKEY_CLASSES_ROOT\CLSID\CLSID] exists at your run time. Its default value points to
the guid of the ClassMoniker ("{0000031A-0000-0000-C000-000000000046").
If it is not there, "clsid:" moniker names won't be parsed since no ("ProgID"="clsid") exists. (ClassMoniker is actually parsed as
ProgID moniker).
To fix that you can add the registry setting manually. Or try adding hivecls.inf or compatws.inf file manually to your image. You
will probably need to run "secedit /import" command against the inf files. So make sure "Security Settings Editor" and "Security
Configuration Engine Command Line Utility" components are included and dependencies resolved.

--
Regards,
KM, BSquare Corp.

Alex,

More suggestions to test the issue:
- Use MkParseDisplayNameEx. This function differs from the MkParseDisplayName function in that it supports extended syntax.
- After the MkParseDisplayName/MkParseDisplayNameEx failure analyze pcchEaten parameter (3rd parameter). It should indicate and
return how much of the string was successfully parsed.
- Try to create (parse) a *native* moniker. E.g., a File or URL Moniker ("http:...", "file:..."). See MSDN on the exact syntax.
- Try XPProEmulation image (www.xpefiles.com, Development Utilities/Main folder). See if your test app work there.
- Use Regmon (and maybe Filemon too) to see why MkParseDisplayName/MkParseDisplayNameEx fails. You can get pretty clean log if
you break just before the API call and then stop logging right after the API call.

KM

--
Regards,
KM, BSquare Corp.

Thanks a lot for all your suggestions. Unfortunately it still does not
work.

- I have tested my app on XPPro and W2K. It works there.
- I do call CoInitialize()
- Primitive OLE32 is on the image
- COM+ services component is included
- ClassMoniker CLSID
[HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}] does exist
- Added ole2disp.dll. Regsvr32 would not register it (16 bit app?).
Compared registry keys where this dll is referenced on XPPro and XPe.
Added following manually:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}]
@="PSSupportErrorInfo"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer]
@="ole2disp.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer32]
@="oleaut32.dll"

None of this helped.

I've created simple test client and replaced CoGetObject() with what
it does internally. Failure occures in MkParseDisplayName(). See
output and code below:

Step 1. Succeeded
Step 2. Succeeded
Step 3. COM error occured. HRESULT = 0x800401E4. Error: Invalid syntax

int main(int argc, char* argv[])
{
CHR(CoInitialize(0));

IBindCtx *pbc=NULL;
CHR(CreateBindCtx(0, &pbc));

ULONG cchEaten=0;
IMoniker *pmk=NULL;

CHR(MkParseDisplayName(pbc,
OLESTR("clsid:141D07D5-286D-4CD3-B41A-3428D9975C04:"), &cchEaten,
&pmk));

IUnknown *punk=NULL;
CHR(pmk->BindToObject(pbc, 0, IID_IUnknown, (void**)&punk));

_tprintf(_T("Test has succeeded\n"));

punk->Release();

pmk->Release();

pbc->Release();

CoUninitialize();

return 0;
}

void CHR(HRESULT hr)
{
static unsigned step = 0;
step++;
if (hr!=S_OK)
{
_tprintf(_T("Step %u. COM error occured. HRESULT = 0x%0X. Error:
%s\n"), step, hr, _com_error(hr).ErrorMessage());
}
else
{
_tprintf(_T("Step %u. Succeeded\n"), step);
}

if (FAILED(hr)) exit(0);
}

Any ideas?

KM said:
Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and
deploy
 
KM,

Thanks. That was it. That key was missing indeed. And all is working
now after I added it.

Thanks again to everyone.

Alex

KM said:
Alex,

At first place I forgot to ask you to check if [HKEY_CLASSES_ROOT\CLSID\CLSID] exists at your run time. Its default value points to
the guid of the ClassMoniker ("{0000031A-0000-0000-C000-000000000046").
If it is not there, "clsid:" moniker names won't be parsed since no ("ProgID"="clsid") exists. (ClassMoniker is actually parsed as
ProgID moniker).
To fix that you can add the registry setting manually. Or try adding hivecls.inf or compatws.inf file manually to your image. You
will probably need to run "secedit /import" command against the inf files. So make sure "Security Settings Editor" and "Security
Configuration Engine Command Line Utility" components are included and dependencies resolved.

--
Regards,
KM, BSquare Corp.

Alex,

More suggestions to test the issue:
- Use MkParseDisplayNameEx. This function differs from the MkParseDisplayName function in that it supports extended syntax.
- After the MkParseDisplayName/MkParseDisplayNameEx failure analyze pcchEaten parameter (3rd parameter). It should indicate and
return how much of the string was successfully parsed.
- Try to create (parse) a *native* moniker. E.g., a File or URL Moniker ("http:...", "file:..."). See MSDN on the exact syntax.
- Try XPProEmulation image (www.xpefiles.com, Development Utilities/Main folder). See if your test app work there.
- Use Regmon (and maybe Filemon too) to see why MkParseDisplayName/MkParseDisplayNameEx fails. You can get pretty clean log if
you break just before the API call and then stop logging right after the API call.

KM

--
Regards,
KM, BSquare Corp.

Thanks a lot for all your suggestions. Unfortunately it still does not
work.

- I have tested my app on XPPro and W2K. It works there.
- I do call CoInitialize()
- Primitive OLE32 is on the image
- COM+ services component is included
- ClassMoniker CLSID
[HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}] does exist
- Added ole2disp.dll. Regsvr32 would not register it (16 bit app?).
Compared registry keys where this dll is referenced on XPPro and XPe.
Added following manually:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}]
@="PSSupportErrorInfo"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer]
@="ole2disp.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer32]
@="oleaut32.dll"

None of this helped.

I've created simple test client and replaced CoGetObject() with what
it does internally. Failure occures in MkParseDisplayName(). See
output and code below:

Step 1. Succeeded
Step 2. Succeeded
Step 3. COM error occured. HRESULT = 0x800401E4. Error: Invalid syntax

int main(int argc, char* argv[])
{
CHR(CoInitialize(0));

IBindCtx *pbc=NULL;
CHR(CreateBindCtx(0, &pbc));

ULONG cchEaten=0;
IMoniker *pmk=NULL;

CHR(MkParseDisplayName(pbc,
OLESTR("clsid:141D07D5-286D-4CD3-B41A-3428D9975C04:"), &cchEaten,
&pmk));

IUnknown *punk=NULL;
CHR(pmk->BindToObject(pbc, 0, IID_IUnknown, (void**)&punk));

_tprintf(_T("Test has succeeded\n"));

punk->Release();

pmk->Release();

pbc->Release();

CoUninitialize();

return 0;
}

void CHR(HRESULT hr)
{
static unsigned step = 0;
step++;
if (hr!=S_OK)
{
_tprintf(_T("Step %u. COM error occured. HRESULT = 0x%0X. Error:
%s\n"), step, hr, _com_error(hr).ErrorMessage());
}
else
{
_tprintf(_T("Step %u. Succeeded\n"), step);
}

if (FAILED(hr)) exit(0);
}

Any ideas?

Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and
deploy
it
again.
- manually add ole2disp.dll to your image (will bring in necessary PSSupportErrorInfo interface). Again, no component in XPe
repository that holds the dll.

That is all I can think of right now.

Also, you may get a better reply in microsoft.public.win32.programmer.ole newsgroup.

--
Regards,
KM, BSquare Corp.


I hope somebody resolved this already.
We have an application (exe) that is being started via
CoGetObject(...). It always fails on XPe with error error 0x800401e4 -
Invalid Syntax. The moniker used is in form of
'clsid:xxxxx-xxx....-xxx:'. What subsystem is missing that is
responsible for parsing monikers starting with 'clsid:'? Our other
components that are regular COM dlls, COM servers and services are
running OK. Only this one, using moniker semantics does not.
We don't have much time on our project left to keep trying to include
various stuff.

I'd really appreciate some help here. Getting desperate.

Thanks,
Alex
 
Alex,

I am glad I could help you.

Although I thought the problem would be more complicated. Not that I am disappointed but I was preparing for the battle :-)

--
Regards,
KM, BSquare Corp.

KM,

Thanks. That was it. That key was missing indeed. And all is working
now after I added it.

Thanks again to everyone.

Alex

KM said:
Alex,

At first place I forgot to ask you to check if [HKEY_CLASSES_ROOT\CLSID\CLSID] exists at your run time. Its default value points to
the guid of the ClassMoniker ("{0000031A-0000-0000-C000-000000000046").
If it is not there, "clsid:" moniker names won't be parsed since no ("ProgID"="clsid") exists. (ClassMoniker is actually parsed as
ProgID moniker).
To fix that you can add the registry setting manually. Or try adding hivecls.inf or compatws.inf file manually to your image. You
will probably need to run "secedit /import" command against the inf files. So make sure "Security Settings Editor" and "Security
Configuration Engine Command Line Utility" components are included and dependencies resolved.

--
Regards,
KM, BSquare Corp.

Alex,

More suggestions to test the issue:
- Use MkParseDisplayNameEx. This function differs from the MkParseDisplayName function in that it supports extended syntax.
- After the MkParseDisplayName/MkParseDisplayNameEx failure analyze pcchEaten parameter (3rd parameter). It should
indicate
and
return how much of the string was successfully parsed.
- Try to create (parse) a *native* moniker. E.g., a File or URL Moniker ("http:...", "file:..."). See MSDN on the exact syntax.
- Try XPProEmulation image (www.xpefiles.com, Development Utilities/Main folder). See if your test app work there.
- Use Regmon (and maybe Filemon too) to see why MkParseDisplayName/MkParseDisplayNameEx fails. You can get pretty clean log if
you break just before the API call and then stop logging right after the API call.

KM

--
Regards,
KM, BSquare Corp.


Thanks a lot for all your suggestions. Unfortunately it still does not
work.

- I have tested my app on XPPro and W2K. It works there.
- I do call CoInitialize()
- Primitive OLE32 is on the image
- COM+ services component is included
- ClassMoniker CLSID
[HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}] does exist
- Added ole2disp.dll. Regsvr32 would not register it (16 bit app?).
Compared registry keys where this dll is referenced on XPPro and XPe.
Added following manually:
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}]
@="PSSupportErrorInfo"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer]
@="ole2disp.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{DF0B3D60-548F-101B-8E65-
08002B2BD119}\InprocServer32]
@="oleaut32.dll"

None of this helped.

I've created simple test client and replaced CoGetObject() with what
it does internally. Failure occures in MkParseDisplayName(). See
output and code below:

Step 1. Succeeded
Step 2. Succeeded
Step 3. COM error occured. HRESULT = 0x800401E4. Error: Invalid syntax

int main(int argc, char* argv[])
{
CHR(CoInitialize(0));

IBindCtx *pbc=NULL;
CHR(CreateBindCtx(0, &pbc));

ULONG cchEaten=0;
IMoniker *pmk=NULL;

CHR(MkParseDisplayName(pbc,
OLESTR("clsid:141D07D5-286D-4CD3-B41A-3428D9975C04:"), &cchEaten,
&pmk));

IUnknown *punk=NULL;
CHR(pmk->BindToObject(pbc, 0, IID_IUnknown, (void**)&punk));

_tprintf(_T("Test has succeeded\n"));

punk->Release();

pmk->Release();

pbc->Release();

CoUninitialize();

return 0;
}

void CHR(HRESULT hr)
{
static unsigned step = 0;
step++;
if (hr!=S_OK)
{
_tprintf(_T("Step %u. COM error occured. HRESULT = 0x%0X. Error:
%s\n"), step, hr, _com_error(hr).ErrorMessage());
}
else
{
_tprintf(_T("Step %u. Succeeded\n"), step);
}

if (FAILED(hr)) exit(0);
}

Any ideas?

Alex,

A couple of clarifications:
- Have you tested your app (and started it the same way you do on XPe) on XP Pro? Did it work there?
- Do you call to CoInitialize before CoGetObject ?
- I assumed "Primitive: Ole32" component is in your image (otherwise you would unlikely be able to use your other COM objects)
- Do you have "COM+ Services" component included?
- At run time check if ClassMoniker is registered (IIRC, [HKCR\CLSID\{0000031A-0000-0000-C000-000000000046}])
If not, include HIVECLS.INF file into your Configuration (there is no component that holds the file), re-build and deploy
it
again.
- manually add ole2disp.dll to your image (will bring in necessary PSSupportErrorInfo interface). Again, no component
in
XPe
repository that holds the dll.

That is all I can think of right now.

Also, you may get a better reply in microsoft.public.win32.programmer.ole newsgroup.

--
Regards,
KM, BSquare Corp.


I hope somebody resolved this already.
We have an application (exe) that is being started via
CoGetObject(...). It always fails on XPe with error error 0x800401e4 -
Invalid Syntax. The moniker used is in form of
'clsid:xxxxx-xxx....-xxx:'. What subsystem is missing that is
responsible for parsing monikers starting with 'clsid:'? Our other
components that are regular COM dlls, COM servers and services are
running OK. Only this one, using moniker semantics does not.
We don't have much time on our project left to keep trying to include
various stuff.

I'd really appreciate some help here. Getting desperate.

Thanks,
Alex
 
Back
Top