&m_ulAdvise is passed to Advise(). For 64bit, it should not work.
This is a pointer. Assuming that m_ulAdvise is a DWORD variable then &m_ulAdvise is using the address-of operator which passes a pointer in the sample code. address-of-operator-amp
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
IConnectionPoint
HRESULT Advise(
[in] IUnknown *pUnkSink,
[out] DWORD *pdwCookie
);
[out] pdwCookie
A pointer to a returned token that uniquely identifies this connection.
We're porting our 32bit application to 64bit.
For 32bit application, there's no issue for pdwCookie as DWORD.
For 64bit, DWORD is not enough for 64bit pointer.
Any suggestion for this?
Thanks in advance,
Mingyang
Answer accepted by question author
&m_ulAdvise is passed to Advise(). For 64bit, it should not work.
This is a pointer. Assuming that m_ulAdvise is a DWORD variable then &m_ulAdvise is using the address-of operator which passes a pointer in the sample code. address-of-operator-amp
You are misinterpreting the code. pdwCookie is a pointer to a DWORD. So in 64 bit code pdwCookie is a 64 bit pointer to a 32 bit value.