SetAuthDataISCL example for C++ 6.0 and later
{
//Example 1
COleVariant vData1("Server LEAD ISCL");
m_pLEADDicomNet->SetAuthDataISCL (m_pLEADDicomNet->GethNet (), vData1, 16);
//Example 2: Binary Data
VARIANT vData2;
BYTE DataArray[5]= {0x21, 0x14, 0x0, 0x45, 0xF4};
SAFEARRAY FAR *psa;
SAFEARRAYBOUND rgsabound[1];
VariantInit(&vData2);
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = 5;
psa = SafeArrayCreate(VT_UI1, 1, rgsabound);
if (psa != NULL)
{
SafeArrayLock(psa);
memcpy(psa->pvData, DataArray, 5);
SafeArrayUnlock(psa);
V_VT(&vData2) = (VT_ARRAY | VT_UI1);
V_ARRAY(&vData2) = psa;
m_pLEADDicomNet->SetAuthDataISCL (m_pLEADDicomNet->GethNet (), &vData2, 5);
SafeArrayDestroy(psa);
}
VariantClear(&vData2);
}