Share via


IsAPIReady (deprecated) (Compact 7)

3/12/2014

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

Note

This function is deprecated. 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

In Windows Embedded Compact, 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 Compact, 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

See Also

Reference

Kernel Functions
GetProcAddress
LoadLibrary
WaitForAPIReady
WaitForSingleObject