LEADTOOLS DICOM C DLL Help > Callback Functions > ONSECURELINKREADY |
#include "ltdic.h"
L_VOID pEXT_CALLBACK Your_Function(hNet, nError, pUserData)
HDICOMNET hNet; |
/* handle to an existing DICOM Network */ |
L_UINT32 nError; |
/* error code */ |
L_VOID * pUserData; |
/* optional pointer to more parameters for the callback */ |
This function is called when an ISCL or TLS secured connection is successfully established. 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. |
nError |
Error code. For a list of possible values, refer to Return Codes. |
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
None.
Comments
This function is called after the ISCL or TLS connection is successfully established. From this moment until the connection is closed, an application can securely send and receive data.
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 |
Win32, x64
See Also
Functions: |
|
Topics: |
|
|
|
|
|
|
Example
#define MAX_STRING_LEN 1024 L_VOID EXT_CALLBACK exOnSecureLinkReady(HDICOMNET hNet, L_UINT32 nError, L_VOID *pUserData) { UNREFERENCED_PARAMETER(pUserData); L_INT nRet; L_TCHAR szMsg[MAX_STRING_LEN]; L_TCHAR szTmp[MAX_STRING_LEN]; char PeerId[128]; L_UINT32 nPeerLength = sizeof(PeerId); if(nError == DICOM_SUCCESS) { nRet = L_DicomGetPeerAuthDataISCL (hNet, PeerId, &nPeerLength); if (nRet != DICOM_SUCCESS) MessageBox(NULL, TEXT("Error Inside Callback Function"), TEXT("exOnSecureLinkReady"), MB_OK); wsprintf(szMsg,TEXT("ISCLLink ready, peer identified by %s"), PeerId); MessageBox(NULL, szMsg, TEXT(""), MB_OK); } else { wsprintf(szTmp, TEXT("%sError[%d]\n"), szMsg, nError); lstrcpy(szMsg, szTmp); MessageBox(NULL, szMsg, TEXT(""), MB_OK); } };