Rtnl2DestroyLinkStatusChangeEvent

Rtnl2DestroyLinkStatusChangeEvent destroys a Link Status Change event previously created by Rtnl2CreateLinkStatusChangeEvent.

Syntax

Copy
BOOL Rtnl2DestroyLinkStatusChangeEvent(
  [in]    RTNL2_HINTERFACE Interface,
  [in]    HANDLE LinkStatusChangeEvent
);

Parameters

[in] Interface

A handle to the interface.

[in] LinkStatusChangeEvent

The value of the event handle obtained from Rtnl2CreateLinkStatusChangeEvent.

Return Value

If the function succeeds, it returns TRUE. If the function fails, it returns FALSE. Call GetLastError to obtain an error code.

Possible error codes:

Error code Meaning

ERROR_NOT_READY

The calling process has not called Rtnl2Init.

ERROR_INVALID_PARAMETER

One of the following conditions occurred:

  • The supplied interface handle is invalid.
  • The interface does not have a Link Status Change event.
  • The supplied value of LinkStatusChangeEvent is not the one that the NL2 returned from Rtnl2CreateLinkStatusChangeEvent.

RTNL2_ERROR_SERIALIZED_COMMAND_TIMEOUT

The NL2 process didn’t reply within an acceptable delay.

RTNL2_ERROR_NO_MORE_COMMUNICATION

Unable to communicate with the NL2 process. This might be because the NL2 process is not running anymore, or because an application process thread was terminated during a previous call to an NL2 API function.

Remarks

After a successful call to this function, the event handle retrieved from Rtnl2CreateLinkStatusChangeEvent is no longer valid and can't be used as a parameter of RtWaitForSingleObject or RtWaitForMultipleObjects.

Note: If an application has several handles to the same interface, only the one that was used to create the Link Status Change event can be used to destroy that event.

Characteristics

Real-time

Deterministic

No

Local memory usage

Process

External MSpace usage

Internal MSpace usage

System

No

Yes. This function will free the memory that was allocated for the Event kernel object in Rtnl2CreateLinkStatusChangeEvent.

NL2 process

No

No

Calling process

No

No

Contiguous memory usage

Usage

No

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Rtnl2Api.h

Rtnl2Api.lib

See Also: