Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: remoting/base/dispatch_win.h

Issue 413763003: clang/win: Fix most -Wwriteable-strings warnings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This file was GENERATED by command: 1 // This file was GENERATED by command:
2 // pump.py dispatch_win.h.pump 2 // pump.py dispatch_win.h.pump
3 // DO NOT EDIT BY HAND!!! 3 // DO NOT EDIT BY HAND!!!
4 4
5 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 5 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
6 // Use of this source code is governed by a BSD-style license that can be 6 // Use of this source code is governed by a BSD-style license that can be
7 // found in the LICENSE file. 7 // found in the LICENSE file.
8 8
9 #ifndef REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ 9 #ifndef REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_
10 #define REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ 10 #define REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // is overwritten when the function returns. The pointed-to value must 110 // is overwritten when the function returns. The pointed-to value must
111 // be initialized before the call, and will be replaced when it returns. 111 // be initialized before the call, and will be replaced when it returns.
112 // [out] parameters may be initialized to VT_EMPTY. 112 // [out] parameters may be initialized to VT_EMPTY.
113 // 113 //
114 // Current limitations: 114 // Current limitations:
115 // - more than 7 parameters are not supported. 115 // - more than 7 parameters are not supported.
116 // - the method ID cannot be cached and reused. 116 // - the method ID cannot be cached and reused.
117 // - VARIANT is the only supported parameter type at the moment. 117 // - VARIANT is the only supported parameter type at the moment.
118 118
119 HRESULT Invoke(IDispatch* object, 119 HRESULT Invoke(IDispatch* object,
120 LPOLESTR name, 120 LPCOLESTR const_name,
121 WORD flags, 121 WORD flags,
122 VARIANT* const & result_out) { 122 VARIANT* const & result_out) {
123 // Retrieve the ID of the method to be called. 123 // Retrieve the ID of the method to be called.
124 DISPID disp_id; 124 DISPID disp_id;
125 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 125 LPOLESTR name = const_cast<LPOLESTR>(const_name);
126 &disp_id); 126 HRESULT hr = object->GetIDsOfNames(
127 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
127 if (FAILED(hr)) 128 if (FAILED(hr))
128 return hr; 129 return hr;
129 130
130 // Request the return value if asked by the caller. 131 // Request the return value if asked by the caller.
131 internal::ScopedVariantArg result; 132 internal::ScopedVariantArg result;
132 VARIANT* disp_result = NULL; 133 VARIANT* disp_result = NULL;
133 if (result_out != NULL) 134 if (result_out != NULL)
134 disp_result = &result; 135 disp_result = &result;
135 136
136 137
(...skipping 17 matching lines...) Expand all
154 // Unwrap the return value. 155 // Unwrap the return value.
155 if (result_out != NULL) { 156 if (result_out != NULL) {
156 result.Unwrap(result_out); 157 result.Unwrap(result_out);
157 } 158 }
158 159
159 return S_OK; 160 return S_OK;
160 } 161 }
161 162
162 template <typename P1> 163 template <typename P1>
163 HRESULT Invoke(IDispatch* object, 164 HRESULT Invoke(IDispatch* object,
164 LPOLESTR name, 165 LPCOLESTR const_name,
165 WORD flags, 166 WORD flags,
166 const P1& p1, 167 const P1& p1,
167 VARIANT* const & result_out) { 168 VARIANT* const & result_out) {
168 // Retrieve the ID of the method to be called. 169 // Retrieve the ID of the method to be called.
169 DISPID disp_id; 170 DISPID disp_id;
170 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 171 LPOLESTR name = const_cast<LPOLESTR>(const_name);
171 &disp_id); 172 HRESULT hr = object->GetIDsOfNames(
173 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
172 if (FAILED(hr)) 174 if (FAILED(hr))
173 return hr; 175 return hr;
174 176
175 // Request the return value if asked by the caller. 177 // Request the return value if asked by the caller.
176 internal::ScopedVariantArg result; 178 internal::ScopedVariantArg result;
177 VARIANT* disp_result = NULL; 179 VARIANT* disp_result = NULL;
178 if (result_out != NULL) 180 if (result_out != NULL)
179 disp_result = &result; 181 disp_result = &result;
180 182
181 // Wrap the parameters into an array of VARIANT structures. 183 // Wrap the parameters into an array of VARIANT structures.
(...skipping 24 matching lines...) Expand all
206 // Unwrap the return value. 208 // Unwrap the return value.
207 if (result_out != NULL) { 209 if (result_out != NULL) {
208 result.Unwrap(result_out); 210 result.Unwrap(result_out);
209 } 211 }
210 212
211 return S_OK; 213 return S_OK;
212 } 214 }
213 215
214 template <typename P1, typename P2> 216 template <typename P1, typename P2>
215 HRESULT Invoke(IDispatch* object, 217 HRESULT Invoke(IDispatch* object,
216 LPOLESTR name, 218 LPCOLESTR const_name,
217 WORD flags, 219 WORD flags,
218 const P1& p1, 220 const P1& p1,
219 const P2& p2, 221 const P2& p2,
220 VARIANT* const & result_out) { 222 VARIANT* const & result_out) {
221 // Retrieve the ID of the method to be called. 223 // Retrieve the ID of the method to be called.
222 DISPID disp_id; 224 DISPID disp_id;
223 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 225 LPOLESTR name = const_cast<LPOLESTR>(const_name);
224 &disp_id); 226 HRESULT hr = object->GetIDsOfNames(
227 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
225 if (FAILED(hr)) 228 if (FAILED(hr))
226 return hr; 229 return hr;
227 230
228 // Request the return value if asked by the caller. 231 // Request the return value if asked by the caller.
229 internal::ScopedVariantArg result; 232 internal::ScopedVariantArg result;
230 VARIANT* disp_result = NULL; 233 VARIANT* disp_result = NULL;
231 if (result_out != NULL) 234 if (result_out != NULL)
232 disp_result = &result; 235 disp_result = &result;
233 236
234 // Wrap the parameters into an array of VARIANT structures. 237 // Wrap the parameters into an array of VARIANT structures.
(...skipping 28 matching lines...) Expand all
263 // Unwrap the return value. 266 // Unwrap the return value.
264 if (result_out != NULL) { 267 if (result_out != NULL) {
265 result.Unwrap(result_out); 268 result.Unwrap(result_out);
266 } 269 }
267 270
268 return S_OK; 271 return S_OK;
269 } 272 }
270 273
271 template <typename P1, typename P2, typename P3> 274 template <typename P1, typename P2, typename P3>
272 HRESULT Invoke(IDispatch* object, 275 HRESULT Invoke(IDispatch* object,
273 LPOLESTR name, 276 LPCOLESTR const_name,
274 WORD flags, 277 WORD flags,
275 const P1& p1, 278 const P1& p1,
276 const P2& p2, 279 const P2& p2,
277 const P3& p3, 280 const P3& p3,
278 VARIANT* const & result_out) { 281 VARIANT* const & result_out) {
279 // Retrieve the ID of the method to be called. 282 // Retrieve the ID of the method to be called.
280 DISPID disp_id; 283 DISPID disp_id;
281 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 284 LPOLESTR name = const_cast<LPOLESTR>(const_name);
282 &disp_id); 285 HRESULT hr = object->GetIDsOfNames(
286 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
283 if (FAILED(hr)) 287 if (FAILED(hr))
284 return hr; 288 return hr;
285 289
286 // Request the return value if asked by the caller. 290 // Request the return value if asked by the caller.
287 internal::ScopedVariantArg result; 291 internal::ScopedVariantArg result;
288 VARIANT* disp_result = NULL; 292 VARIANT* disp_result = NULL;
289 if (result_out != NULL) 293 if (result_out != NULL)
290 disp_result = &result; 294 disp_result = &result;
291 295
292 // Wrap the parameters into an array of VARIANT structures. 296 // Wrap the parameters into an array of VARIANT structures.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Unwrap the return value. 329 // Unwrap the return value.
326 if (result_out != NULL) { 330 if (result_out != NULL) {
327 result.Unwrap(result_out); 331 result.Unwrap(result_out);
328 } 332 }
329 333
330 return S_OK; 334 return S_OK;
331 } 335 }
332 336
333 template <typename P1, typename P2, typename P3, typename P4> 337 template <typename P1, typename P2, typename P3, typename P4>
334 HRESULT Invoke(IDispatch* object, 338 HRESULT Invoke(IDispatch* object,
335 LPOLESTR name, 339 LPCOLESTR const_name,
336 WORD flags, 340 WORD flags,
337 const P1& p1, 341 const P1& p1,
338 const P2& p2, 342 const P2& p2,
339 const P3& p3, 343 const P3& p3,
340 const P4& p4, 344 const P4& p4,
341 VARIANT* const & result_out) { 345 VARIANT* const & result_out) {
342 // Retrieve the ID of the method to be called. 346 // Retrieve the ID of the method to be called.
343 DISPID disp_id; 347 DISPID disp_id;
344 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 348 LPOLESTR name = const_cast<LPOLESTR>(const_name);
345 &disp_id); 349 HRESULT hr = object->GetIDsOfNames(
350 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
346 if (FAILED(hr)) 351 if (FAILED(hr))
347 return hr; 352 return hr;
348 353
349 // Request the return value if asked by the caller. 354 // Request the return value if asked by the caller.
350 internal::ScopedVariantArg result; 355 internal::ScopedVariantArg result;
351 VARIANT* disp_result = NULL; 356 VARIANT* disp_result = NULL;
352 if (result_out != NULL) 357 if (result_out != NULL)
353 disp_result = &result; 358 disp_result = &result;
354 359
355 // Wrap the parameters into an array of VARIANT structures. 360 // Wrap the parameters into an array of VARIANT structures.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // Unwrap the return value. 397 // Unwrap the return value.
393 if (result_out != NULL) { 398 if (result_out != NULL) {
394 result.Unwrap(result_out); 399 result.Unwrap(result_out);
395 } 400 }
396 401
397 return S_OK; 402 return S_OK;
398 } 403 }
399 404
400 template <typename P1, typename P2, typename P3, typename P4, typename P5> 405 template <typename P1, typename P2, typename P3, typename P4, typename P5>
401 HRESULT Invoke(IDispatch* object, 406 HRESULT Invoke(IDispatch* object,
402 LPOLESTR name, 407 LPCOLESTR const_name,
403 WORD flags, 408 WORD flags,
404 const P1& p1, 409 const P1& p1,
405 const P2& p2, 410 const P2& p2,
406 const P3& p3, 411 const P3& p3,
407 const P4& p4, 412 const P4& p4,
408 const P5& p5, 413 const P5& p5,
409 VARIANT* const & result_out) { 414 VARIANT* const & result_out) {
410 // Retrieve the ID of the method to be called. 415 // Retrieve the ID of the method to be called.
411 DISPID disp_id; 416 DISPID disp_id;
412 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 417 LPOLESTR name = const_cast<LPOLESTR>(const_name);
413 &disp_id); 418 HRESULT hr = object->GetIDsOfNames(
419 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
414 if (FAILED(hr)) 420 if (FAILED(hr))
415 return hr; 421 return hr;
416 422
417 // Request the return value if asked by the caller. 423 // Request the return value if asked by the caller.
418 internal::ScopedVariantArg result; 424 internal::ScopedVariantArg result;
419 VARIANT* disp_result = NULL; 425 VARIANT* disp_result = NULL;
420 if (result_out != NULL) 426 if (result_out != NULL)
421 disp_result = &result; 427 disp_result = &result;
422 428
423 // Wrap the parameters into an array of VARIANT structures. 429 // Wrap the parameters into an array of VARIANT structures.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if (result_out != NULL) { 471 if (result_out != NULL) {
466 result.Unwrap(result_out); 472 result.Unwrap(result_out);
467 } 473 }
468 474
469 return S_OK; 475 return S_OK;
470 } 476 }
471 477
472 template <typename P1, typename P2, typename P3, typename P4, typename P5, 478 template <typename P1, typename P2, typename P3, typename P4, typename P5,
473 typename P6> 479 typename P6>
474 HRESULT Invoke(IDispatch* object, 480 HRESULT Invoke(IDispatch* object,
475 LPOLESTR name, 481 LPCOLESTR const_name,
476 WORD flags, 482 WORD flags,
477 const P1& p1, 483 const P1& p1,
478 const P2& p2, 484 const P2& p2,
479 const P3& p3, 485 const P3& p3,
480 const P4& p4, 486 const P4& p4,
481 const P5& p5, 487 const P5& p5,
482 const P6& p6, 488 const P6& p6,
483 VARIANT* const & result_out) { 489 VARIANT* const & result_out) {
484 // Retrieve the ID of the method to be called. 490 // Retrieve the ID of the method to be called.
485 DISPID disp_id; 491 DISPID disp_id;
486 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 492 LPOLESTR name = const_cast<LPOLESTR>(const_name);
487 &disp_id); 493 HRESULT hr = object->GetIDsOfNames(
494 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
488 if (FAILED(hr)) 495 if (FAILED(hr))
489 return hr; 496 return hr;
490 497
491 // Request the return value if asked by the caller. 498 // Request the return value if asked by the caller.
492 internal::ScopedVariantArg result; 499 internal::ScopedVariantArg result;
493 VARIANT* disp_result = NULL; 500 VARIANT* disp_result = NULL;
494 if (result_out != NULL) 501 if (result_out != NULL)
495 disp_result = &result; 502 disp_result = &result;
496 503
497 // Wrap the parameters into an array of VARIANT structures. 504 // Wrap the parameters into an array of VARIANT structures.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 if (result_out != NULL) { 550 if (result_out != NULL) {
544 result.Unwrap(result_out); 551 result.Unwrap(result_out);
545 } 552 }
546 553
547 return S_OK; 554 return S_OK;
548 } 555 }
549 556
550 template <typename P1, typename P2, typename P3, typename P4, typename P5, 557 template <typename P1, typename P2, typename P3, typename P4, typename P5,
551 typename P6, typename P7> 558 typename P6, typename P7>
552 HRESULT Invoke(IDispatch* object, 559 HRESULT Invoke(IDispatch* object,
553 LPOLESTR name, 560 LPCOLESTR const_name,
554 WORD flags, 561 WORD flags,
555 const P1& p1, 562 const P1& p1,
556 const P2& p2, 563 const P2& p2,
557 const P3& p3, 564 const P3& p3,
558 const P4& p4, 565 const P4& p4,
559 const P5& p5, 566 const P5& p5,
560 const P6& p6, 567 const P6& p6,
561 const P7& p7, 568 const P7& p7,
562 VARIANT* const & result_out) { 569 VARIANT* const & result_out) {
563 // Retrieve the ID of the method to be called. 570 // Retrieve the ID of the method to be called.
564 DISPID disp_id; 571 DISPID disp_id;
565 HRESULT hr = object->GetIDsOfNames(IID_NULL, &name, 1, LOCALE_USER_DEFAULT, 572 LPOLESTR name = const_cast<LPOLESTR>(const_name);
566 &disp_id); 573 HRESULT hr = object->GetIDsOfNames(
574 IID_NULL, &name, 1, LOCALE_USER_DEFAULT, &disp_id);
567 if (FAILED(hr)) 575 if (FAILED(hr))
568 return hr; 576 return hr;
569 577
570 // Request the return value if asked by the caller. 578 // Request the return value if asked by the caller.
571 internal::ScopedVariantArg result; 579 internal::ScopedVariantArg result;
572 VARIANT* disp_result = NULL; 580 VARIANT* disp_result = NULL;
573 if (result_out != NULL) 581 if (result_out != NULL)
574 disp_result = &result; 582 disp_result = &result;
575 583
576 // Wrap the parameters into an array of VARIANT structures. 584 // Wrap the parameters into an array of VARIANT structures.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 636 }
629 637
630 return S_OK; 638 return S_OK;
631 } 639 }
632 640
633 } // namespace dispatch 641 } // namespace dispatch
634 642
635 } // namespace remoting 643 } // namespace remoting
636 644
637 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_ 645 #endif // REMOTING_BASE_IDISPATCH_DRIVER_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698