| 我使用UC库做了一个StoreSCU,结果连接agfaStore服务时,出现连接失败的问题!调试发现出错的地方在下面的函数中的AcceptedPresentationContexts数组内容为空,请教各位大侠,能否告诉我是什么原因引起的,谢谢…… 
 BOOL PDU_Service :: InterogateAAssociateAC()
 {
 UINT Index, ValidPresContexts;
 PresentationContextAccept PresContextAccept;
 Array<PresentationContextAccept> PCArray ( FALSE );
 Index = 0;
 ValidPresContexts = 0;
 PCArray = (AAssociateAC :: PresContextAccepts);
 while ( AcceptedPresentationContexts.GetSize())
 AcceptedPresentationContexts.RemoveAt ( 0 );
 while ( Index < PCArray.GetSize())
 {
 PresContextAccept = PCArray.Get ( Index );
 if(!PresContextAccept.Result)
 {
 AcceptedPresentationContexts.Add ( PresContextAccept );
 }
 ++Index;
 }
 if(!AcceptedPresentationContexts.GetSize())
 {
 ::MessageBox(NULL,"位置2","错误",MB_OK);
 return ( FALSE ); // no, this association should be terminated
 }
 return ( TRUE ); // yes, the communication should work out
 }
 |