KasperskyOS Community Edition 1.3

Getting IPC handles and RIIDs to use statically created IPC channels (sl_api.h)

This API is defined in the header file sysroot-*-kos/include/coresrv/sl/sl_api.h from the KasperskyOS SDK.

The API allows servers to get the listener handles, and allows clients to get the client IPC handles and Runtime Implementation Identifiers (RIIDs) for the purpose of using statically created IPC channels.

Closing an obtained IPC handle will cause the IPC channel to become unavailable. After an IPC handle is closed, it is impossible to obtain it again or restore access to the IPC channel.

Information about API functions is provided in the table below.

sl_api.h functions

Function

Information about the function

ServiceLocatorRegister()

Purpose

Gets the listener handle based on the name of the IPC channel.

Parameters

  • [in] channelName – pointer to the name of the IPC channel.
  • [in] endpoints – fictitious parameter (obsolete). It must be set to RTL_NULL.
  • [in] endpointsSize – fictitious parameter (obsolete). It must be set to 0.
  • [out] id – fictitious parameter (obsolete).

Returned values

If successful, it returns the listener handle. Otherwise, it returns INVALID_HANDLE.

ServiceLocatorConnect()

Purpose

Gets the client IPC handle based on the name of the IPC channel.

Parameters

  • [in] channelName – pointer to the name of the IPC channel.

Returned values

If successful, it returns the client IPC handle. Otherwise, it returns INVALID_HANDLE.

ServiceLocatorGetRiid()

Purpose

Gets the endpoint ID (RIID).

Parameters

Returned values

If successful, the function returns the endpoint ID (RIID), otherwise it returns INVALID_RIID. The type of returned value is defined in the header file sysroot-*-kos/include/nk/types.h from the KasperskyOS SDK.