IsAPIReady (Windows Embedded CE 6.0)

1/6/2010

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

Note

This function is obsolete as of Windows Embedded CE 6.0. Use WaitForAPIReady instead. WaitForAPIReady does not poll.

Syntax

BOOL IsAPIReady(
  DWORD hAPI
);

Parameters

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

Return Value

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 Embedded 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 the API for readiness before making the call. If an API is called before it is ready to be used, an exception can occur and terminate your thread and process.

Applications and drivers that might run before Windows Explorer or an OEM-customized shell 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

Detects shell APIs.

SH_GDI

Detects Graphics Device Interface (GDI) APIs.

SH_WMGR

Detects Windows Manager APIs.

In Windows Embedded 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 the LoadLibrary function to load the DLL that exposes the API, and then use the GetProcAddress function to return a pointer to the API.

Requirements

Header windev.h
Library coredll.dll
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

Kernel Functions
WaitForAPIReady

Concepts

Obsolete Kernel APIs

Other Resources

GetProcAddress
LoadLibrary
WaitForSingleObject