2 // Wizard-generated connection point proxy class
3 // WARNING: This file may be regenerated by the wizard
9 class CProxy_IDNSSDEvents
:
10 public IConnectionPointImpl
<T
, &__uuidof(_IDNSSDEvents
)>
13 HRESULT
Fire_DomainFound( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, BSTR domain
)
16 T
* pThis
= static_cast<T
*>(this);
17 int cConnections
= m_vec
.GetSize();
19 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
22 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
25 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
29 CComVariant avarParams
[4];
30 avarParams
[3] = service
;
31 avarParams
[2] = flags
;
32 avarParams
[1] = ifIndex
;
33 avarParams
[1].vt
= VT_UI4
;
34 avarParams
[0] = domain
;
35 avarParams
[0].vt
= VT_BSTR
;
36 DISPPARAMS params
= { avarParams
, NULL
, 4, 0 };
37 hr
= pConnection
->Invoke(1, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
42 HRESULT
Fire_DomainLost( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, BSTR domain
)
45 T
* pThis
= static_cast<T
*>(this);
46 int cConnections
= m_vec
.GetSize();
48 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
51 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
54 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
58 CComVariant avarParams
[4];
59 avarParams
[3] = service
;
60 avarParams
[2] = flags
;
61 avarParams
[1] = ifIndex
;
62 avarParams
[1].vt
= VT_UI4
;
63 avarParams
[0] = domain
;
64 avarParams
[0].vt
= VT_BSTR
;
65 DISPPARAMS params
= { avarParams
, NULL
, 4, 0 };
66 hr
= pConnection
->Invoke(2, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
71 HRESULT
Fire_ServiceFound( IDNSSDService
* browser
, DNSSDFlags flags
, ULONG ifIndex
, BSTR serviceName
, BSTR regType
, BSTR domain
)
74 T
* pThis
= static_cast<T
*>(this);
75 int cConnections
= m_vec
.GetSize();
77 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
80 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
83 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
87 CComVariant avarParams
[6];
88 avarParams
[5] = browser
;
89 avarParams
[4] = flags
;
90 avarParams
[3] = ifIndex
;
91 avarParams
[3].vt
= VT_UI4
;
92 avarParams
[2] = serviceName
;
93 avarParams
[2].vt
= VT_BSTR
;
94 avarParams
[1] = regType
;
95 avarParams
[1].vt
= VT_BSTR
;
96 avarParams
[0] = domain
;
97 avarParams
[0].vt
= VT_BSTR
;
98 DISPPARAMS params
= { avarParams
, NULL
, 6, 0 };
99 hr
= pConnection
->Invoke(3, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
104 HRESULT
Fire_ServiceLost( IDNSSDService
* browser
, DNSSDFlags flags
, ULONG ifIndex
, BSTR serviceName
, BSTR regType
, BSTR domain
)
107 T
* pThis
= static_cast<T
*>(this);
108 int cConnections
= m_vec
.GetSize();
110 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
113 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
116 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
120 CComVariant avarParams
[6];
121 avarParams
[5] = browser
;
122 avarParams
[4] = flags
;
123 avarParams
[3] = ifIndex
;
124 avarParams
[3].vt
= VT_UI4
;
125 avarParams
[2] = serviceName
;
126 avarParams
[2].vt
= VT_BSTR
;
127 avarParams
[1] = regType
;
128 avarParams
[1].vt
= VT_BSTR
;
129 avarParams
[0] = domain
;
130 avarParams
[0].vt
= VT_BSTR
;
131 DISPPARAMS params
= { avarParams
, NULL
, 6, 0 };
132 hr
= pConnection
->Invoke(4, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
137 HRESULT
Fire_ServiceResolved( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, BSTR fullName
, BSTR hostName
, USHORT port
, ITXTRecord
* record
)
140 T
* pThis
= static_cast<T
*>(this);
141 int cConnections
= m_vec
.GetSize();
143 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
146 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
149 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
153 CComVariant avarParams
[7];
154 avarParams
[6] = service
;
155 avarParams
[5] = flags
;
156 avarParams
[4] = ifIndex
;
157 avarParams
[4].vt
= VT_UI4
;
158 avarParams
[3] = fullName
;
159 avarParams
[3].vt
= VT_BSTR
;
160 avarParams
[2] = hostName
;
161 avarParams
[2].vt
= VT_BSTR
;
162 avarParams
[1] = port
;
163 avarParams
[1].vt
= VT_UI2
;
164 avarParams
[0] = record
;
165 DISPPARAMS params
= { avarParams
, NULL
, 7, 0 };
166 hr
= pConnection
->Invoke(5, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
171 HRESULT
Fire_ServiceRegistered( IDNSSDService
* service
, DNSSDFlags flags
, BSTR name
, BSTR regType
, BSTR domain
)
174 T
* pThis
= static_cast<T
*>(this);
175 int cConnections
= m_vec
.GetSize();
177 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
180 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
183 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
187 CComVariant avarParams
[5];
188 avarParams
[4] = service
;
189 avarParams
[3] = flags
;
190 avarParams
[2] = name
;
191 avarParams
[2].vt
= VT_BSTR
;
192 avarParams
[1] = regType
;
193 avarParams
[1].vt
= VT_BSTR
;
194 avarParams
[0] = domain
;
195 avarParams
[0].vt
= VT_BSTR
;
196 DISPPARAMS params
= { avarParams
, NULL
, 5, 0 };
197 hr
= pConnection
->Invoke(6, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
202 HRESULT
Fire_QueryRecordAnswered( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, BSTR fullName
, DNSSDRRType rrtype
, DNSSDRRClass rrclass
, VARIANT rdata
, ULONG ttl
)
205 T
* pThis
= static_cast<T
*>(this);
206 int cConnections
= m_vec
.GetSize();
208 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
211 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
214 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
218 CComVariant avarParams
[8];
219 avarParams
[7] = service
;
220 avarParams
[6] = flags
;
221 avarParams
[5] = ifIndex
;
222 avarParams
[5].vt
= VT_UI4
;
223 avarParams
[4] = fullName
;
224 avarParams
[4].vt
= VT_BSTR
;
225 avarParams
[3] = rrtype
;
226 avarParams
[2] = rrclass
;
227 avarParams
[1] = rdata
;
229 avarParams
[0].vt
= VT_UI4
;
230 DISPPARAMS params
= { avarParams
, NULL
, 8, 0 };
231 hr
= pConnection
->Invoke(7, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
236 HRESULT
Fire_RecordRegistered( IDNSSDRecord
* record
, DNSSDFlags flags
)
239 T
* pThis
= static_cast<T
*>(this);
240 int cConnections
= m_vec
.GetSize();
242 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
245 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
248 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
252 CComVariant avarParams
[2];
253 avarParams
[1] = record
;
254 avarParams
[0] = flags
;
255 DISPPARAMS params
= { avarParams
, NULL
, 2, 0 };
256 hr
= pConnection
->Invoke(8, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
261 HRESULT
Fire_AddressFound( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, BSTR hostname
, DNSSDAddressFamily addressFamily
, BSTR address
, ULONG ttl
)
264 T
* pThis
= static_cast<T
*>(this);
265 int cConnections
= m_vec
.GetSize();
267 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
270 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
273 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
277 CComVariant avarParams
[7];
278 avarParams
[6] = service
;
279 avarParams
[5] = flags
;
280 avarParams
[4] = ifIndex
;
281 avarParams
[4].vt
= VT_UI4
;
282 avarParams
[3] = hostname
;
283 avarParams
[3].vt
= VT_BSTR
;
284 avarParams
[2] = addressFamily
;
285 avarParams
[1] = address
;
286 avarParams
[1].vt
= VT_BSTR
;
288 avarParams
[0].vt
= VT_UI4
;
289 DISPPARAMS params
= { avarParams
, NULL
, 7, 0 };
290 hr
= pConnection
->Invoke(9, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
295 HRESULT
Fire_MappingCreated( IDNSSDService
* service
, DNSSDFlags flags
, ULONG ifIndex
, ULONG externalAddress
, DNSSDAddressFamily addressFamily
, DNSSDProtocol protocol
, USHORT internalPort
, USHORT externalPort
, ULONG ttl
)
298 T
* pThis
= static_cast<T
*>(this);
299 int cConnections
= m_vec
.GetSize();
301 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
304 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
307 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
311 CComVariant avarParams
[9];
312 avarParams
[8] = service
;
313 avarParams
[7] = flags
;
314 avarParams
[6] = ifIndex
;
315 avarParams
[6].vt
= VT_UI4
;
316 avarParams
[5] = externalAddress
;
317 avarParams
[5].vt
= VT_UI4
;
318 avarParams
[4] = addressFamily
;
319 avarParams
[3] = protocol
;
320 avarParams
[2] = internalPort
;
321 avarParams
[2].vt
= VT_UI2
;
322 avarParams
[1] = externalPort
;
323 avarParams
[1].vt
= VT_UI2
;
325 avarParams
[0].vt
= VT_UI4
;
326 DISPPARAMS params
= { avarParams
, NULL
, 9, 0 };
327 hr
= pConnection
->Invoke(10, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);
332 HRESULT
Fire_OperationFailed( IDNSSDService
* service
, DNSSDError error
)
335 T
* pThis
= static_cast<T
*>(this);
336 int cConnections
= m_vec
.GetSize();
338 for (int iConnection
= 0; iConnection
< cConnections
; iConnection
++)
341 CComPtr
<IUnknown
> punkConnection
= m_vec
.GetAt(iConnection
);
344 IDispatch
* pConnection
= static_cast<IDispatch
*>(punkConnection
.p
);
348 CComVariant avarParams
[2];
349 avarParams
[1] = service
;
350 avarParams
[0] = error
;
351 DISPPARAMS params
= { avarParams
, NULL
, 2, 0 };
352 hr
= pConnection
->Invoke(11, IID_NULL
, LOCALE_USER_DEFAULT
, DISPATCH_METHOD
, ¶ms
, NULL
, NULL
, NULL
);