Compartir a través de


AdvertiseInterface (Windows CE 5.0)

Send Feedback

This function allows a driver to announce what interfaces it exposes.

BOOL AdvertiseInterface(const GUID* devclass,LPCWSTR name,BOOL fAdd);

Parameters

  • devclass
    [in] Pointer to a device interface globally unique identifier (GUID). It cannot be NULL. For information on the predefined device interface GUIDs, see Device Interfaces.
  • name
    [in] Name of the interface instance. Use this name to identify this instance in whatever way the interface requires. This name must be unique in the interface's access namespace. Therefore, "DSK2:" might be available in both the generic stream interface namespace and the block interface namespace, and will probably, but not necessarily, refer to the same actual driver.
  • fAdd
    [in] Data to specify whether to add or remove the interface. Set to TRUE if the interface was added. Set to FALSE if the interface was removed.

Return Values

TRUE indicates success. FALSE indicates failure. Reasons for failure include a GUID that is not unique and name, permission denied, and insufficient memory to track the interface. It also fails if you attempt to remove an interface that was never added.

Remarks

Adding an interface with AdvertiseInterface allocates resources within the Device Manager. Be sure to advertise its removal before the driver is unloaded.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

See Also

Device Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.