logo       

Re: Can't register for PIM notifications in WM 5 OS: msg#00030

windows.ce.devel

Subject: Re: Can't register for PIM notifications in WM 5 OS

Ok, I figured out my problem with this (pilot error). For WM5 POOM I
called Logon() with "NULL" instead of a window handle for receiving
messages.

ppcinfo

--- In windowsce-dev@xxxxxxxxxxxxxxx, "pocketpcinfo"
<pocketpcinfo@xxxx> wrote:
>
> I'm having some trouble getting the WM 5 OS to notify my
application
> when a task has been created, altered, or deleted. From the limited
> SDK documentation, it explains that in need to register for such
> notifications which I did using the code below (following the
> provided sample code). However, when I make the SetProps() method
> call I get hr = E_ACCESSDENIED. Now, I seem to be able to other
> operations with this coding (such as using the GetProps() to
retrieve
> category labels), but I just can't seem to use SetProps() to
register
> for notifications.
>
> Can anyone help with some advice?
>
> Thanks,
>
> ppcinfo
>
> ------------------------------------------
>
> HRESULT hr = E_FAIL;
> IFolder *pFolder = NULL;
> IItem *pFolderIItem = NULL;
>
> CEPROPVAL propval = {0};
>
> if ( WM5_InitPoom(g_hWnd) == FALSE )
> return (FALSE);
>
> hr = g_WM5polApp->GetDefaultFolder(olFolderTasks,&pFolder);
>
> if (FAILED(hr) || NULL == pFolder)
> {
> WM5_ShutdownPoom();
> return FALSE;
> }
>
> // Get IItem from IFolder
>
> hr = pFolder->QueryInterface(IID_IItem,(LPVOID*)&pFolderIItem);
>
> if(FAILED(hr) || NULL == pFolderIItem)
> {
> pFolder->Release(); pFolder = NULL;
> WM5_ShutdownPoom();
> return FALSE;
> }
>
> propval.propid = PIMPR_FOLDERNOTIFICATIONS;
> propval.val.ulVal = PIMFOLDERNOTIFICATION_ALL;
>
> hr = pFolderIItem->SetProps(0,1,&propval);
>
> //- SetProps() always returns E_ACCESSDENIED
>






------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise