seeking helps to resolve the infinitive loop issue in the below code -- what's wrong or what's missing??
//Initialize IRMClientContext *irmCtx
IRMClientCommonParms iniParms;
IRMClientParms irmParms;
IRMStatus irmStat;
unsigned char* pDer = NULL;
size_t bufSize;
iniParms.parmsVersion = IRM_CLIENT_PARMS_VERSION;
iniParms.allocRtn = allocRtn;
iniParms.allocArg = NULL;
iniParms.freeRtn = freeRtn;
iniParms.freeArg = NULL;
irmCreateCertChain(&m_pAppCert);
bufSize = getUDer(&pDer);
irmStat = irmAppendCertChain(m_pAppCert,pDer,bufSize);
irmParms.parmsType = IRM_CLIENT_PARMS_CLASSIC;
irmParms.classic.appCertChain = m_pAppCert;
irmParms.classic.appName = "irmDwgClient";
irmParms.classic.appVersion = "1.0.0.0";
IRMClientContext* irmCtx;
IRMApplicationMode appMode = IRM_APPLICATION_INTERACTIVE;
IRMStatus irmStat;
irmStat = irmInitClient(appMode, &iniParms,
&irmParms, 1, &irmCtx);
…
-------------------------------------------------------------------
//Initialize IRMContentOpenParams openParams
IRMContentOpenParms openParms;
openParms.parent = 0;
openParms.mode = IRM_OPEN_WRITE;
openParms.ioInCb = &readRtn;
openParms.ioInArg = protFile;
openParms.ioOutCb = (IRMIoOutRtn)&writeRtn;
openParms.ioOutArg = protFile;
openParms.ioSizeCb = &sizeRtn;
openParms.ioSizeArg = protFile;
openParms.session = 0;
openParms.contentType = L"dwg";
openParms.contentTitle = protFileName;
openParms.policyName = 0;
openParms.relatedContent = 0;
-------------------------------------------------------------------
//connect to IRM server…
irmStat = irmOpenContent(irmCtx, &openParms, &ioCtx); //stop here
-------------------------------------------------------------------
The code will run through irmOpenContent(), and opens a window to input username and password. After inputting them and hit OK, the following message appears and the same window will jump out again to form an infinitive loop. The issue is in
irmStat = irmOpenContent(irmCtx, &openParms, &ioCtx) , and it returns nothing in IRMStatus irmStat.
