Current Application ID functions

These functions can be used to obtain and manipulate the PID (process ID) and OID (Originator ID - currently unused) of the calling application.

Normally, SVC_GetPid() and SVC_GetOid() functions are used to obtain these values. However, in patched PKCS#11 functions, the necessary value of token is not available; the provided functions must be used instead.

>FM_GetCurrentPid

>FM_GetCurrentOid

>FM_SetCurrentPid

>FM_SetCurrentOid

FM_GetCurrentPid

This function returns the PID recorded in the current request originated from the host side. if there is no active request (e.g. a call from Startup()function), FM_DEFAULT_PID is returned.

Synopsis

#include <fmappid.h>ditto for other FM ID functions
unsigned long FM_GetCurrentPid(void);

Return Code

The PID of the application which originated the request.

FM_GetCurrentOid

This function returns the OID recorded in the current request originated from the host side. if there is no active request (e.g. a call from Startup()function), FM_DEFAULT_OID is returned.

Synopsis

unsigned long FM_GetCurrentOid(void);

Return Code

The OID of the application which originated the request.

FM_SetCurrentPid

This function overrides the PID recorded in the current request originated from the host side. If there is no active request the function does nothing.

Synopsis

unsigned long FM_SetCurrentPid(unsigned long pid);
Parameter Description
pid The new PID to be recorded in the request.

Return Code

N/A

FM_SetCurrentOid

This function overrides the OID recorded in the current request originated from the host side. If there is no active request the function does nothing.

Synopsis

unsigned long FM_SetCurrentOid(unsigned long oid);
Parameter Description
oid The new OID to be recorded in the request.

Return Code

N/A