I want to pass _ConnectionPtr pConn to dll as argument in interface and there i want to use this connection object instead of making new object because to connect database it take more time.so how can do?
Printable View
I want to pass _ConnectionPtr pConn to dll as argument in interface and there i want to use this connection object instead of making new object because to connect database it take more time.so how can do?
Try this:
-----------------
_ConnectionPtr m_pConn;
------------------
// Dll function:
void put_ActiveConnection(LPDISPATCH lConn)
{
m_pConn=lConn;
}