IReplStore::FindFirstItem
The FindFirstItem method returns a new handle to the first object in a specified folder. The object handle is a Windows CE HREPLITEM structure.
Syntax
HRESULT FindFirstItem (
HREPLFLD hFld,
HREPLITEM * phItem,
BOOL * pfExist
);
Parameters
- hFld
[in] Specifies a handle to a folder, as a HREPLFLD structure. - phItem
[out] Reference to a handle to the first object in the folder. - pfExist
[out] Reference to a Boolean value; TRUE if there is an object in the folder and FALSE otherwise.
Return Values
This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:
- S_OK
The method completed successfully.
Remarks
This method works with IReplStore::FindNextItem and IReplStore::FindItemClose to enumerate all objects in a specified folder.
FindFirstItem and FindNextItem create a Windows CE HREPLITEM structure for the objects. All HREPLITEM structures passed by the ActiveSync service manager are originally created from these methods.
An ActiveSync service provider should implement thread synchronization between the FindItemClose method and methods that write to the store to prevent a method from writing to the store between calls to FindFirstItem and FindItemClose.
Requirements
Smartphone: Windows Mobile 2002 and later
OS Versions: Windows CE 3.0 and later
Header: cesync.h
Library: None
See Also
Last updated on Friday, April 22, 2005
© 2005 Microsoft Corporation. All rights reserved.
Send feedback on this topic to the authors.