IsAPIReady (Windows CE 5.0)

Send Feedback

This function indicates whether the specified application programming interface (API) set has been registered.

BOOL IsAPIReady( DWORD hAPI);

Parameters

  • hAPI
    [in] Handle to the specified API set.

Return Values

TRUE indicates that the API set has been registered and the APIs are ready for use. FALSE indicates that the API set has not been registered and the APIs are not ready for use.

Remarks

You can also use other mechanisms to determine if an API is ready. For more information, see Determining if an API is Ready.

In Windows CE, a system-level API might not be available to be called at the time that an application or driver needs to use it. In this situation, it is important to test for the API's readiness before making the API call. If an API is called before it is ready to be used, an exception can occur, which might terminate your thread and process.

Applications and drivers that might run before Gwes.exe and the Shell (Windows Explorer or an OEM-customized shell) system components are loaded must call IsAPIReady before using the APIs supported by these system components.

The following table shows what handles to use with IsAPIReady.

Handle Description
SH_SHELL Detect shell services APIs
SH_GDI Detect GDI APIs
SH_WMGR Detect Windows Manager APIs

In Windows CE, the APIs that make up a version of the OS can differ from device to device.

If you are writing an application or driver that targets a particular device, the API set should be known.

If you are targeting more then one device, it is important to dynamically reference APIs. This enables your application or driver to run on a variety of devices.

To dynamically reference an API, use LoadLibrary to load the dynamic-link library (DLL) that exposes the API and then use GetProcAddress to return a pointer to the API.

Requirements

OS Versions: Windows CE 2.10 and later.
Header: Windev.h.
Link Library: Coredll.dll.

See Also

GetProcAddress | LoadLibrary | WaitForSingleObject

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.