Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > Activex Programming Control Webwiz > Authentication ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 88 of 174
Post > Topic >>

Authentication window while accessing safe activex control

by "=?Utf-8?B?UGFyYW0=?=" <Param@[EMAIL PROTECTED] > Apr 11, 2005 at 09:06 PM

Hi,
I have made an acivex control as safe by implemeting following 2 methods.
I am getting authentication window, while accessing this control in
internet 
zone.
How to prevent this dialog. Please help me


HRESULT STDMETHODCALLTYPE 
	CTCSCADataSignerCtrl::XObjSafe::GetInterfaceSafetyOptions( 
		/* [in] */ REFIID riid,
        /* [out] */ DWORD __RPC_FAR *pdwSup****tedOptions,
        /* [out] */ DWORD __RPC_FAR *pdwEnabledOptions)
{
	METHOD_PROLOGUE(CTCSCADataSignerCtrl, ObjSafe)

	HRESULT retval = ResultFromScode(S_OK);

	// does interface exist?
	IUnknown FAR* punkInterface;
	retval = pThis->ExternalQueryInterface(&riid, 
					(void * *)&punkInterface);
	if (retval != E_NOINTERFACE) {	// interface exists
		punkInterface->Release(); // release it--just checking!
	}
	
	// we sup****t both kinds of safety and have always both set,
	// regardless of interface
	*pdwSup****tedOptions = *pdwEnabledOptions = dwSup****tedBits;

	return retval; // E_NOINTERFACE if QI failed
}


HRESULT STDMETHODCALLTYPE 
	CTCSCADataSignerCtrl::XObjSafe::SetInterfaceSafetyOptions( 
        /* [in] */ REFIID riid,
        /* [in] */ DWORD dwOptionSetMask,
        /* [in] */ DWORD dwEnabledOptions)
{
    METHOD_PROLOGUE(CTCSCADataSignerCtrl, ObjSafe)
	
	// does interface exist?
	IUnknown FAR* punkInterface;
	pThis->ExternalQueryInterface(&riid, (void * *)&punkInterface);
	if (punkInterface) {	// interface exists
		punkInterface->Release(); // release it--just checking!
	}
	else { // interface doesn't exist
		return ResultFromScode(E_NOINTERFACE);
	}

	// can't set bits we don't sup****t
	if (dwOptionSetMask & dwNotSup****tedBits) { 
		return ResultFromScode(E_FAIL);
	}
	
	// can't set bits we do sup****t to zero
	dwEnabledOptions &= dwSup****tedBits;
	// (we already know there are no extra bits in mask )
	if ((dwOptionSetMask & dwEnabledOptions) !=
		 dwOptionSetMask) {
		return ResultFromScode(E_FAIL);
	}								
	
	// don't need to change anything since we're always safe
	return ResultFromScode(S_OK);
}

thanx in advance
Param
 




 1 Posts in Topic:
Authentication window while accessing safe activex control
"=?Utf-8?B?UGFyYW0=?  2005-04-11 21:06:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 19:31:01 CST 2008.