// DicomNetSink.cpp : implementation file // #include "stdafx.h" extern CDICOMSRVApp theApp; #include "DicomNetSink.h" #include "SRVDlg.h" extern long glSec; #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CDicomNetPasswordSink IMPLEMENT_DYNCREATE(CDicomNetPasswordSink, CCmdTarget) CDicomNetPasswordSink::CDicomNetPasswordSink() { EnableAutomation(); m_pDlg=NULL; } CDicomNetPasswordSink::~CDicomNetPasswordSink() { } void CDicomNetPasswordSink::OnFinalRelease() { // When the last reference for an automation object is released // OnFinalRelease is called. The base class will automatically // deletes the object. Add additional cleanup required for your // object before calling the base class. CCmdTarget::OnFinalRelease(); } BEGIN_MESSAGE_MAP(CDicomNetPasswordSink, CCmdTarget) //{{AFX_MSG_MAP(CDicomNetPasswordSink) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() BEGIN_DISPATCH_MAP(CDicomNetPasswordSink, CCmdTarget) //{{AFX_DISPATCH_MAP(CDicomNetPasswordSink) // NOTE - the ClassWizard will add and remove mapping macros here. DISP_FUNCTION_ID(CDicomNetPasswordSink, "SSLPrivateKeyPasswordEvent", 43, OnSSLPrivateKeyPasswordEvent, VT_EMPTY, VTS_I4 VTS_I4) //}}AFX_DISPATCH_MAP END_DISPATCH_MAP() // Note: we add support for IID_IDicomNetSink to support typesafe binding // from VBA. This IID must match the GUID that is attached to the // dispinterface in the .ODL file. // {43AAB0AA-90D7-4118-A9F0-A604EDF0BFA9} static const IID IID_IDicomNetSink = { 0x43aab0aa, 0x90d7, 0x4118, { 0xa9, 0xf0, 0xa6, 0x4, 0xed, 0xf0, 0xbf, 0xa9 } }; BEGIN_INTERFACE_MAP(CDicomNetPasswordSink, CCmdTarget) INTERFACE_PART(CDicomNetPasswordSink, DIID__LEADDicomNetEvents, Dispatch) END_INTERFACE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDicomNetPasswordSink message handlers //******************************************************************************************** //************************************************************** // // Events // //*************************************************************** void CDicomNetPasswordSink::OnSSLPrivateKeyPasswordEvent(long hNet, long nFlag) { _bstr_t bstrPrivateKeyPassword = theApp.m_strPrivateKeyPassword; m_pDlg->m_pLEADDICOMNETPassword->SSLPrivateKeyPassword = bstrPrivateKeyPassword; }