Dear all,

I am developing a remote tool using WINCE Platform Manager API and face
the following problem.

Scenario:
-VB code from samplesreg.vbs
Set platman = CreateObject("PlatformManager.PlatformManager.1")
Set package = platman.AddPackage (pkgName, pkgId)
-My equivalent VC++ code
CoInitializeEx(NULL, COINIT_MULTITHREADED);
IPMPlatformManager *PlatMan = NULL;
HRESULT hRes = CoCreateInstance(CLSID_PlatformManager,
NULL,
CLSCTX_LOCAL_SERVER,
IID_IPMPlatformManager,
(void**)&PlatMan);
IPMPackage* ppiPackage;
hRes = PlatMan->AddPackage( pPackageName,
NULL,
&ppiPackage);
-The above call to AddPackage() returns error
-Error code is 0xc0000005 which is not documented in winerror.h
-However, i can successfully call other fuctions of IPMPlatformManager
like
CreateGUID() and EnumPackages()

Questions:
1. Can anybody tell what is wrong with my implementation? Or, anything
more to be done?

2. I find two interfaces, IPlatformManager and IPMPlatformManager in
cemgr.h and all samples seem to be using IPlatformManager and not
IPMPlatformManager. What is the difference between the two interfaces?

3. Is it possible to add packages to Platform manager using
IPlatformManager interface?

Any help would be welcome.

Thanks in advance,
Aiswarya

Re: Plaform Manager API question by aiswarya

aiswarya
Tue Oct 18 03:19:40 CDT 2005

Dear All,

Looks like most queries on Platman API goes unanswered :)

The described problem was due to my incorrect allocation of
the BSTR pPackageName. After correcting the same,the API
worked fine.

However, differences between IPMPlatformManager and the
MSDN documented IPMPlatformManager are still unclear:

1. Is there any sample code available showing usage of
IPMPlatformManager rather than IPlatformManager ?
2. Is it possible to add packages to Platform manager using
IPlatformManager interface?

Thanks in advance,
Aiswarya


> Dear all,
>
> I am developing a remote tool using WINCE Platform Manager API and face
> the following problem.
>
> Scenario:
> -VB code from samplesreg.vbs
> Set platman = CreateObject("PlatformManager.PlatformManager.1")
> Set package = platman.AddPackage (pkgName, pkgId)
> -My equivalent VC++ code
> CoInitializeEx(NULL, COINIT_MULTITHREADED);
> IPMPlatformManager *PlatMan = NULL;
> HRESULT hRes = CoCreateInstance(CLSID_PlatformManager,
> NULL,
> CLSCTX_LOCAL_SERVER,
> IID_IPMPlatformManager,
> (void**)&PlatMan);
> IPMPackage* ppiPackage;
> hRes = PlatMan->AddPackage( pPackageName,
> NULL,
> &ppiPackage);
> -The above call to AddPackage() returns error
> -Error code is 0xc0000005 which is not documented in winerror.h
> -However, i can successfully call other fuctions of IPMPlatformManager
> like
> CreateGUID() and EnumPackages()
>
> Questions:
> 1. Can anybody tell what is wrong with my implementation? Or, anything
> more to be done?
>
> 2. I find two interfaces, IPlatformManager and IPMPlatformManager in
> cemgr.h and all samples seem to be using IPlatformManager and not
> IPMPlatformManager. What is the difference between the two interfaces?
>
> 3. Is it possible to add packages to Platform manager using
> IPlatformManager interface?
>
> Any help would be welcome.
>
> Thanks in advance,
> Aiswarya


Re: Plaform Manager API question by coliot

coliot
Tue Oct 25 11:50:57 CDT 2005

I hope this will help you.

1. Unfortunately there are no known samples for IPMPlatformManager.
IPMPlatformManager is the newer interface that supports scriptability as it
implements IDispatch.
2. Adding packages in not possible for the IPlatformManager interface.
IPlatformManager, IPlatformManager2 and IPlatformManager3 don't expose this
functionality.

Thanks,

Chloe Oliot
Windows CE Test Lead - Diagnostics Tools

This posting is provided "AS IS" with no warranties, and confers no rights.