GETCHALLENGECALLBACK

#include "ltdic.h"

L_UINT32 pEXT_CALLBACK Your_Function(hNet, nChallenge, nParameter, pUserData)

HDICOMNET hNet;

/* handle to an existing DICOM Network */

L_UINT64 *nChallenge;

/* pointer to a variable */

L_UINT64 nParameter;

/* key */

L_VOID * pUserData;

/* optional pointer to more parameters for the callback */

Generates a random number. This function is available in the PACS Imaging.

Parameter

Description

hNet

Handle to an existing DICOM Network. This is the handle returned from the L_DicomCreateNet function.

nChallenge

Pointer to a variable to be updated with the random number generated in the callback. This number is similar to a time stamp.

nParameter

Value that indicates the current mutual authentication key.

pUserData

Void pointer that you can use to pass one or more additional parameters that the callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Returns

DICOM_SUCCESS

The generation of the random number was successful.

<> DICOM_SUCCESS

The generation of the random number was not successful.

Comments

The generation of a random number can use a pool of random (or pseudo-random) data. If the pool is empty, the GetChallenge function may fail. In this case, try to call GetChallenge later in the application, when some random data has been added to the pool.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

INTERNALAUTHENTICATECALLBACK

Topics:

DICOM Net: Callback Function

 

Sending and Receiving Messages

 

General Integrated Secure Communication Layer (ISCL) Information

Example

For an example, refer to INTERNALAUTHENTICATECALLBACK.