STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
appdomain.h
Go to the documentation of this file.
1 /***
2 *appdomain.h
3 *
4 * Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose: Utitily for cross App Domain Calls
7 *
8 * [Public]
9 *
10 ****/
11 
12 #pragma once
13 
14 #if !defined (_INC_MSCLR_APPDOMAIN)
15 
16 #ifndef __cplusplus_cli
17 #error ERROR: msclr libraries require /clr and are not compatible with /clr:oldSyntax
18 #endif /* __cplusplus_cli */
19 
20 #ifdef _M_CEE_PURE
21 #error ERROR: msclr appdomain helpers can only be used in mixed mode. Use a cross-domain delegate in pure mode
22 #endif /* _M_CEE_PURE */
23 #include <mscoree.h>
24 #include <crtdbg.h>
25 
26 #if defined (_M_IX86)
27 #define _MSCLR_STDCALL_DISTINCT 1
28 #elif defined (_M_X64)
29 #define _MSCLR_STDCALL_DISTINCT 0
30 #elif defined (_M_ARM) || defined (_M_ARM64)
31 #define _MSCLR_STDCALL_DISTINCT 0
32 #else /* defined (_M_ARM) */
33 #error Need to add setting for different CPU
34 #endif /* defined (_M_ARM) */
35 
36 namespace msclr
37 {
38 
39 namespace _detail
40 {
41 
42 /* helper functions */
43 
44 inline
45 void validate(HRESULT hr)
46 {
47  _ASSERT(SUCCEEDED(hr));
48  if (FAILED(hr))
49  {
50  System::Runtime::InteropServices::Marshal::ThrowExceptionForHR(hr);
51  }
52 }
53 
54 inline
55 System::Guid FromGUID(GUID const & guid)
56 {
57  return System::Guid( guid.Data1, guid.Data2, guid.Data3,
58  guid.Data4[ 0 ], guid.Data4[ 1 ],
59  guid.Data4[ 2 ], guid.Data4[ 3 ],
60  guid.Data4[ 4 ], guid.Data4[ 5 ],
61  guid.Data4[ 6 ], guid.Data4[ 7 ] );
62 }
63 
64 inline
65 ICLRRuntimeHost *get_clr_runtime_host(void)
66 {
67  using System::Runtime::InteropServices::RuntimeEnvironment;
68 
69  // Throws HR exception on failure.
70  ICLRRuntimeHost *pClrHost = NULL;
71  pClrHost = reinterpret_cast<ICLRRuntimeHost*>(
72  RuntimeEnvironment::GetRuntimeInterfaceAsIntPtr(
73  FromGUID(CLSID_CLRRuntimeHost), FromGUID(IID_ICLRRuntimeHost)).ToPointer());
74 
75  return pClrHost;
76 }
77 
78 /* callback struct */
79 
80 /* __stdcall version */
81 
82 #if _MSCLR_STDCALL_DISTINCT
83 
84 template <typename RetType>
85 struct callback_stdcall_struct0
86 {
87  RetType (__stdcall *func)();
88  RetType retValue;
89 
90  static HRESULT __stdcall callback(void *cookie)
91  {
92  HRESULT hr = E_FAIL;
93  if (cookie == NULL)
94  {
95  return hr;
96  }
97  callback_stdcall_struct0 *pcs = (callback_stdcall_struct0*)cookie;
98  pcs->retValue = pcs->func();
99  hr = S_OK;
100  return hr;
101  }
102 };
103 
104 template <typename RetType, typename ArgType1>
105 struct callback_stdcall_struct1
106 {
107  RetType (__stdcall *func)(ArgType1);
108  RetType retValue;
109  ArgType1 arg1;
110 
111  static HRESULT __stdcall callback(void *cookie)
112  {
113  HRESULT hr = E_FAIL;
114  if (cookie == NULL)
115  {
116  return hr;
117  }
118  callback_stdcall_struct1 *pcs = (callback_stdcall_struct1*)cookie;
119  pcs->retValue = pcs->func(pcs->arg1);
120  hr = S_OK;
121  return hr;
122  }
123 };
124 
125 template <typename RetType, typename ArgType1, typename ArgType2>
126 struct callback_stdcall_struct2
127 {
128  RetType (__stdcall *func)(ArgType1, ArgType2);
129  RetType retValue;
130  ArgType1 arg1;
131  ArgType2 arg2;
132 
133  static HRESULT __stdcall callback(void *cookie)
134  {
135  HRESULT hr = E_FAIL;
136  if (cookie == NULL)
137  {
138  return hr;
139  }
140  callback_stdcall_struct2 *pcs = (callback_stdcall_struct2*)cookie;
141  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2);
142  hr = S_OK;
143  return hr;
144  }
145 };
146 
147 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3>
148 struct callback_stdcall_struct3
149 {
150  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3);
151  RetType retValue;
152  ArgType1 arg1;
153  ArgType2 arg2;
154  ArgType3 arg3;
155 
156  static HRESULT __stdcall callback(void *cookie)
157  {
158  HRESULT hr = E_FAIL;
159  if (cookie == NULL)
160  {
161  return hr;
162  }
163  callback_stdcall_struct3 *pcs = (callback_stdcall_struct3*)cookie;
164  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3);
165  hr = S_OK;
166  return hr;
167  }
168 };
169 
170 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
171 struct callback_stdcall_struct4
172 {
173  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4);
174  RetType retValue;
175  ArgType1 arg1;
176  ArgType2 arg2;
177  ArgType3 arg3;
178  ArgType4 arg4;
179 
180  static HRESULT __stdcall callback(void *cookie)
181  {
182  HRESULT hr = E_FAIL;
183  if (cookie == NULL)
184  {
185  return hr;
186  }
187  callback_stdcall_struct4 *pcs = (callback_stdcall_struct4*)cookie;
188  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4);
189  hr = S_OK;
190  return hr;
191  }
192 };
193 
194 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
195 struct callback_stdcall_struct5
196 {
197  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5);
198  RetType retValue;
199  ArgType1 arg1;
200  ArgType2 arg2;
201  ArgType3 arg3;
202  ArgType4 arg4;
203  ArgType5 arg5;
204 
205  static HRESULT __stdcall callback(void *cookie)
206  {
207  HRESULT hr = E_FAIL;
208  if (cookie == NULL)
209  {
210  return hr;
211  }
212  callback_stdcall_struct5 *pcs = (callback_stdcall_struct5*)cookie;
213  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5);
214  hr = S_OK;
215  return hr;
216  }
217 };
218 
219 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
220 struct callback_stdcall_struct6
221 {
222  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6);
223  RetType retValue;
224  ArgType1 arg1;
225  ArgType2 arg2;
226  ArgType3 arg3;
227  ArgType4 arg4;
228  ArgType5 arg5;
229  ArgType6 arg6;
230 
231  static HRESULT __stdcall callback(void *cookie)
232  {
233  HRESULT hr = E_FAIL;
234  if (cookie == NULL)
235  {
236  return hr;
237  }
238  callback_stdcall_struct6 *pcs = (callback_stdcall_struct6*)cookie;
239  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6);
240  hr = S_OK;
241  return hr;
242  }
243 };
244 
245 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
246 struct callback_stdcall_struct7
247 {
248  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7);
249  RetType retValue;
250  ArgType1 arg1;
251  ArgType2 arg2;
252  ArgType3 arg3;
253  ArgType4 arg4;
254  ArgType5 arg5;
255  ArgType6 arg6;
256  ArgType7 arg7;
257 
258  static HRESULT __stdcall callback(void *cookie)
259  {
260  HRESULT hr = E_FAIL;
261  if (cookie == NULL)
262  {
263  return hr;
264  }
265  callback_stdcall_struct7 *pcs = (callback_stdcall_struct7*)cookie;
266  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7);
267  hr = S_OK;
268  return hr;
269  }
270 };
271 
272 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
273 struct callback_stdcall_struct8
274 {
275  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8);
276  RetType retValue;
277  ArgType1 arg1;
278  ArgType2 arg2;
279  ArgType3 arg3;
280  ArgType4 arg4;
281  ArgType5 arg5;
282  ArgType6 arg6;
283  ArgType7 arg7;
284  ArgType8 arg8;
285 
286  static HRESULT __stdcall callback(void *cookie)
287  {
288  HRESULT hr = E_FAIL;
289  if (cookie == NULL)
290  {
291  return hr;
292  }
293  callback_stdcall_struct8 *pcs = (callback_stdcall_struct8*)cookie;
294  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8);
295  hr = S_OK;
296  return hr;
297  }
298 };
299 
300 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
301 struct callback_stdcall_struct9
302 {
303  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9);
304  RetType retValue;
305  ArgType1 arg1;
306  ArgType2 arg2;
307  ArgType3 arg3;
308  ArgType4 arg4;
309  ArgType5 arg5;
310  ArgType6 arg6;
311  ArgType7 arg7;
312  ArgType8 arg8;
313  ArgType9 arg9;
314 
315  static HRESULT __stdcall callback(void *cookie)
316  {
317  HRESULT hr = E_FAIL;
318  if (cookie == NULL)
319  {
320  return hr;
321  }
322  callback_stdcall_struct9 *pcs = (callback_stdcall_struct9*)cookie;
323  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9);
324  hr = S_OK;
325  return hr;
326  }
327 };
328 
329 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
330 struct callback_stdcall_struct10
331 {
332  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10);
333  RetType retValue;
334  ArgType1 arg1;
335  ArgType2 arg2;
336  ArgType3 arg3;
337  ArgType4 arg4;
338  ArgType5 arg5;
339  ArgType6 arg6;
340  ArgType7 arg7;
341  ArgType8 arg8;
342  ArgType9 arg9;
343  ArgType10 arg10;
344 
345  static HRESULT __stdcall callback(void *cookie)
346  {
347  HRESULT hr = E_FAIL;
348  if (cookie == NULL)
349  {
350  return hr;
351  }
352  callback_stdcall_struct10 *pcs = (callback_stdcall_struct10*)cookie;
353  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10);
354  hr = S_OK;
355  return hr;
356  }
357 };
358 
359 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
360 struct callback_stdcall_struct11
361 {
362  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11);
363  RetType retValue;
364  ArgType1 arg1;
365  ArgType2 arg2;
366  ArgType3 arg3;
367  ArgType4 arg4;
368  ArgType5 arg5;
369  ArgType6 arg6;
370  ArgType7 arg7;
371  ArgType8 arg8;
372  ArgType9 arg9;
373  ArgType10 arg10;
374  ArgType11 arg11;
375 
376  static HRESULT __stdcall callback(void *cookie)
377  {
378  HRESULT hr = E_FAIL;
379  if (cookie == NULL)
380  {
381  return hr;
382  }
383  callback_stdcall_struct11 *pcs = (callback_stdcall_struct11*)cookie;
384  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11);
385  hr = S_OK;
386  return hr;
387  }
388 };
389 
390 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
391 struct callback_stdcall_struct12
392 {
393  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12);
394  RetType retValue;
395  ArgType1 arg1;
396  ArgType2 arg2;
397  ArgType3 arg3;
398  ArgType4 arg4;
399  ArgType5 arg5;
400  ArgType6 arg6;
401  ArgType7 arg7;
402  ArgType8 arg8;
403  ArgType9 arg9;
404  ArgType10 arg10;
405  ArgType11 arg11;
406  ArgType12 arg12;
407 
408  static HRESULT __stdcall callback(void *cookie)
409  {
410  HRESULT hr = E_FAIL;
411  if (cookie == NULL)
412  {
413  return hr;
414  }
415  callback_stdcall_struct12 *pcs = (callback_stdcall_struct12*)cookie;
416  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12);
417  hr = S_OK;
418  return hr;
419  }
420 };
421 
422 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
423 struct callback_stdcall_struct13
424 {
425  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13);
426  RetType retValue;
427  ArgType1 arg1;
428  ArgType2 arg2;
429  ArgType3 arg3;
430  ArgType4 arg4;
431  ArgType5 arg5;
432  ArgType6 arg6;
433  ArgType7 arg7;
434  ArgType8 arg8;
435  ArgType9 arg9;
436  ArgType10 arg10;
437  ArgType11 arg11;
438  ArgType12 arg12;
439  ArgType13 arg13;
440 
441  static HRESULT __stdcall callback(void *cookie)
442  {
443  HRESULT hr = E_FAIL;
444  if (cookie == NULL)
445  {
446  return hr;
447  }
448  callback_stdcall_struct13 *pcs = (callback_stdcall_struct13*)cookie;
449  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13);
450  hr = S_OK;
451  return hr;
452  }
453 };
454 
455 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
456 struct callback_stdcall_struct14
457 {
458  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14);
459  RetType retValue;
460  ArgType1 arg1;
461  ArgType2 arg2;
462  ArgType3 arg3;
463  ArgType4 arg4;
464  ArgType5 arg5;
465  ArgType6 arg6;
466  ArgType7 arg7;
467  ArgType8 arg8;
468  ArgType9 arg9;
469  ArgType10 arg10;
470  ArgType11 arg11;
471  ArgType12 arg12;
472  ArgType13 arg13;
473  ArgType14 arg14;
474 
475  static HRESULT __stdcall callback(void *cookie)
476  {
477  HRESULT hr = E_FAIL;
478  if (cookie == NULL)
479  {
480  return hr;
481  }
482  callback_stdcall_struct14 *pcs = (callback_stdcall_struct14*)cookie;
483  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14);
484  hr = S_OK;
485  return hr;
486  }
487 };
488 
489 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
490 struct callback_stdcall_struct15
491 {
492  RetType (__stdcall *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15);
493  RetType retValue;
494  ArgType1 arg1;
495  ArgType2 arg2;
496  ArgType3 arg3;
497  ArgType4 arg4;
498  ArgType5 arg5;
499  ArgType6 arg6;
500  ArgType7 arg7;
501  ArgType8 arg8;
502  ArgType9 arg9;
503  ArgType10 arg10;
504  ArgType11 arg11;
505  ArgType12 arg12;
506  ArgType13 arg13;
507  ArgType14 arg14;
508  ArgType15 arg15;
509 
510  static HRESULT __stdcall callback(void *cookie)
511  {
512  HRESULT hr = E_FAIL;
513  if (cookie == NULL)
514  {
515  return hr;
516  }
517  callback_stdcall_struct15 *pcs = (callback_stdcall_struct15*)cookie;
518  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14, pcs->arg15);
519  hr = S_OK;
520  return hr;
521  }
522 };
523 
524 struct callback_stdcall_void_struct0
525 {
526  void (__stdcall *func)();
527 
528  static HRESULT __stdcall callback(void *cookie)
529  {
530  HRESULT hr = E_FAIL;
531  if (cookie == NULL)
532  {
533  return hr;
534  }
535  callback_stdcall_void_struct0 *pcs = (callback_stdcall_void_struct0*)cookie;
536  pcs->func();
537  hr = S_OK;
538  return hr;
539  }
540 };
541 
542 template <typename ArgType1>
543 struct callback_stdcall_void_struct1
544 {
545  void (__stdcall * func)(ArgType1);
546  ArgType1 arg1;
547 
548  static HRESULT __stdcall callback(void *cookie)
549  {
550  HRESULT hr = E_FAIL;
551  if (cookie == NULL)
552  {
553  return hr;
554  }
555  callback_stdcall_void_struct1 *pcs = (callback_stdcall_void_struct1*)cookie;
556  pcs->func(pcs->arg1);
557  hr = S_OK;
558  return hr;
559  }
560 };
561 
562 template <typename ArgType1, typename ArgType2>
563 struct callback_stdcall_void_struct2
564 {
565  void (__stdcall * func)(ArgType1, ArgType2);
566  ArgType1 arg1;
567  ArgType2 arg2;
568 
569  static HRESULT __stdcall callback(void *cookie)
570  {
571  HRESULT hr = E_FAIL;
572  if (cookie == NULL)
573  {
574  return hr;
575  }
576  callback_stdcall_void_struct2 *pcs = (callback_stdcall_void_struct2*)cookie;
577  pcs->func(pcs->arg1, pcs->arg2);
578  hr = S_OK;
579  return hr;
580  }
581 };
582 
583 template <typename ArgType1, typename ArgType2, typename ArgType3>
584 struct callback_stdcall_void_struct3
585 {
586  void (__stdcall * func)(ArgType1, ArgType2, ArgType3);
587  ArgType1 arg1;
588  ArgType2 arg2;
589  ArgType3 arg3;
590 
591  static HRESULT __stdcall callback(void *cookie)
592  {
593  HRESULT hr = E_FAIL;
594  if (cookie == NULL)
595  {
596  return hr;
597  }
598  callback_stdcall_void_struct3 *pcs = (callback_stdcall_void_struct3*)cookie;
599  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3);
600  hr = S_OK;
601  return hr;
602  }
603 };
604 
605 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
606 struct callback_stdcall_void_struct4
607 {
608  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4);
609  ArgType1 arg1;
610  ArgType2 arg2;
611  ArgType3 arg3;
612  ArgType4 arg4;
613 
614  static HRESULT __stdcall callback(void *cookie)
615  {
616  HRESULT hr = E_FAIL;
617  if (cookie == NULL)
618  {
619  return hr;
620  }
621  callback_stdcall_void_struct4 *pcs = (callback_stdcall_void_struct4*)cookie;
622  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4);
623  hr = S_OK;
624  return hr;
625  }
626 };
627 
628 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
629 struct callback_stdcall_void_struct5
630 {
631  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5);
632  ArgType1 arg1;
633  ArgType2 arg2;
634  ArgType3 arg3;
635  ArgType4 arg4;
636  ArgType5 arg5;
637 
638  static HRESULT __stdcall callback(void *cookie)
639  {
640  HRESULT hr = E_FAIL;
641  if (cookie == NULL)
642  {
643  return hr;
644  }
645  callback_stdcall_void_struct5 *pcs = (callback_stdcall_void_struct5*)cookie;
646  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5);
647  hr = S_OK;
648  return hr;
649  }
650 };
651 
652 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
653 struct callback_stdcall_void_struct6
654 {
655  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6);
656  ArgType1 arg1;
657  ArgType2 arg2;
658  ArgType3 arg3;
659  ArgType4 arg4;
660  ArgType5 arg5;
661  ArgType6 arg6;
662 
663  static HRESULT __stdcall callback(void *cookie)
664  {
665  HRESULT hr = E_FAIL;
666  if (cookie == NULL)
667  {
668  return hr;
669  }
670  callback_stdcall_void_struct6 *pcs = (callback_stdcall_void_struct6*)cookie;
671  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6);
672  hr = S_OK;
673  return hr;
674  }
675 };
676 
677 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
678 struct callback_stdcall_void_struct7
679 {
680  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7);
681  ArgType1 arg1;
682  ArgType2 arg2;
683  ArgType3 arg3;
684  ArgType4 arg4;
685  ArgType5 arg5;
686  ArgType6 arg6;
687  ArgType7 arg7;
688 
689  static HRESULT __stdcall callback(void *cookie)
690  {
691  HRESULT hr = E_FAIL;
692  if (cookie == NULL)
693  {
694  return hr;
695  }
696  callback_stdcall_void_struct7 *pcs = (callback_stdcall_void_struct7*)cookie;
697  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7);
698  hr = S_OK;
699  return hr;
700  }
701 };
702 
703 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
704 struct callback_stdcall_void_struct8
705 {
706  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8);
707  ArgType1 arg1;
708  ArgType2 arg2;
709  ArgType3 arg3;
710  ArgType4 arg4;
711  ArgType5 arg5;
712  ArgType6 arg6;
713  ArgType7 arg7;
714  ArgType8 arg8;
715 
716  static HRESULT __stdcall callback(void *cookie)
717  {
718  HRESULT hr = E_FAIL;
719  if (cookie == NULL)
720  {
721  return hr;
722  }
723  callback_stdcall_void_struct8 *pcs = (callback_stdcall_void_struct8*)cookie;
724  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8);
725  hr = S_OK;
726  return hr;
727  }
728 };
729 
730 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
731 struct callback_stdcall_void_struct9
732 {
733  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9);
734  ArgType1 arg1;
735  ArgType2 arg2;
736  ArgType3 arg3;
737  ArgType4 arg4;
738  ArgType5 arg5;
739  ArgType6 arg6;
740  ArgType7 arg7;
741  ArgType8 arg8;
742  ArgType9 arg9;
743 
744  static HRESULT __stdcall callback(void *cookie)
745  {
746  HRESULT hr = E_FAIL;
747  if (cookie == NULL)
748  {
749  return hr;
750  }
751  callback_stdcall_void_struct9 *pcs = (callback_stdcall_void_struct9*)cookie;
752  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9);
753  hr = S_OK;
754  return hr;
755  }
756 };
757 
758 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
759 struct callback_stdcall_void_struct10
760 {
761  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10);
762  ArgType1 arg1;
763  ArgType2 arg2;
764  ArgType3 arg3;
765  ArgType4 arg4;
766  ArgType5 arg5;
767  ArgType6 arg6;
768  ArgType7 arg7;
769  ArgType8 arg8;
770  ArgType9 arg9;
771  ArgType10 arg10;
772 
773  static HRESULT __stdcall callback(void *cookie)
774  {
775  HRESULT hr = E_FAIL;
776  if (cookie == NULL)
777  {
778  return hr;
779  }
780  callback_stdcall_void_struct10 *pcs = (callback_stdcall_void_struct10*)cookie;
781  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10);
782  hr = S_OK;
783  return hr;
784  }
785 };
786 
787 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
788 struct callback_stdcall_void_struct11
789 {
790  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11);
791  ArgType1 arg1;
792  ArgType2 arg2;
793  ArgType3 arg3;
794  ArgType4 arg4;
795  ArgType5 arg5;
796  ArgType6 arg6;
797  ArgType7 arg7;
798  ArgType8 arg8;
799  ArgType9 arg9;
800  ArgType10 arg10;
801  ArgType11 arg11;
802 
803  static HRESULT __stdcall callback(void *cookie)
804  {
805  HRESULT hr = E_FAIL;
806  if (cookie == NULL)
807  {
808  return hr;
809  }
810  callback_stdcall_void_struct11 *pcs = (callback_stdcall_void_struct11*)cookie;
811  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11);
812  hr = S_OK;
813  return hr;
814  }
815 };
816 
817 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
818 struct callback_stdcall_void_struct12
819 {
820  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12);
821  ArgType1 arg1;
822  ArgType2 arg2;
823  ArgType3 arg3;
824  ArgType4 arg4;
825  ArgType5 arg5;
826  ArgType6 arg6;
827  ArgType7 arg7;
828  ArgType8 arg8;
829  ArgType9 arg9;
830  ArgType10 arg10;
831  ArgType11 arg11;
832  ArgType12 arg12;
833 
834  static HRESULT __stdcall callback(void *cookie)
835  {
836  HRESULT hr = E_FAIL;
837  if (cookie == NULL)
838  {
839  return hr;
840  }
841  callback_stdcall_void_struct12 *pcs = (callback_stdcall_void_struct12*)cookie;
842  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12);
843  hr = S_OK;
844  return hr;
845  }
846 };
847 
848 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
849 struct callback_stdcall_void_struct13
850 {
851  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13);
852  ArgType1 arg1;
853  ArgType2 arg2;
854  ArgType3 arg3;
855  ArgType4 arg4;
856  ArgType5 arg5;
857  ArgType6 arg6;
858  ArgType7 arg7;
859  ArgType8 arg8;
860  ArgType9 arg9;
861  ArgType10 arg10;
862  ArgType11 arg11;
863  ArgType12 arg12;
864  ArgType13 arg13;
865 
866  static HRESULT __stdcall callback(void *cookie)
867  {
868  HRESULT hr = E_FAIL;
869  if (cookie == NULL)
870  {
871  return hr;
872  }
873  callback_stdcall_void_struct13 *pcs = (callback_stdcall_void_struct13*)cookie;
874  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13);
875  hr = S_OK;
876  return hr;
877  }
878 };
879 
880 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
881 struct callback_stdcall_void_struct14
882 {
883  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14);
884  ArgType1 arg1;
885  ArgType2 arg2;
886  ArgType3 arg3;
887  ArgType4 arg4;
888  ArgType5 arg5;
889  ArgType6 arg6;
890  ArgType7 arg7;
891  ArgType8 arg8;
892  ArgType9 arg9;
893  ArgType10 arg10;
894  ArgType11 arg11;
895  ArgType12 arg12;
896  ArgType13 arg13;
897  ArgType14 arg14;
898 
899  static HRESULT __stdcall callback(void *cookie)
900  {
901  HRESULT hr = E_FAIL;
902  if (cookie == NULL)
903  {
904  return hr;
905  }
906  callback_stdcall_void_struct14 *pcs = (callback_stdcall_void_struct14*)cookie;
907  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14);
908  hr = S_OK;
909  return hr;
910  }
911 };
912 
913 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
914 struct callback_stdcall_void_struct15
915 {
916  void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15);
917  ArgType1 arg1;
918  ArgType2 arg2;
919  ArgType3 arg3;
920  ArgType4 arg4;
921  ArgType5 arg5;
922  ArgType6 arg6;
923  ArgType7 arg7;
924  ArgType8 arg8;
925  ArgType9 arg9;
926  ArgType10 arg10;
927  ArgType11 arg11;
928  ArgType12 arg12;
929  ArgType13 arg13;
930  ArgType14 arg14;
931  ArgType15 arg15;
932 
933  static HRESULT __stdcall callback(void *cookie)
934  {
935  HRESULT hr = E_FAIL;
936  if (cookie == NULL)
937  {
938  return hr;
939  }
940  callback_stdcall_void_struct15 *pcs = (callback_stdcall_void_struct15*)cookie;
941  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14, pcs->arg15);
942  hr = S_OK;
943  return hr;
944  }
945 };
946 
947 #endif /* _MSCLR_STDCALL_DISTINCT */
948 
949 /* __cdecl version */
950 
951 template <typename RetType>
953 {
954  RetType (__cdecl *func)();
956 
957  static HRESULT __stdcall callback(void *cookie)
958  {
959  HRESULT hr = E_FAIL;
960  if (cookie == NULL)
961  {
962  return hr;
963  }
965  pcs->retValue = pcs->func();
966  hr = S_OK;
967  return hr;
968  }
969 };
970 
971 template <typename RetType, typename ArgType1>
973 {
974  RetType (__cdecl *func)(ArgType1);
976  ArgType1 arg1;
977 
978  static HRESULT __stdcall callback(void *cookie)
979  {
980  HRESULT hr = E_FAIL;
981  if (cookie == NULL)
982  {
983  return hr;
984  }
986  pcs->retValue = pcs->func(pcs->arg1);
987  hr = S_OK;
988  return hr;
989  }
990 };
991 
992 template <typename RetType, typename ArgType1, typename ArgType2>
994 {
995  RetType (__cdecl *func)(ArgType1, ArgType2);
997  ArgType1 arg1;
998  ArgType2 arg2;
999 
1000  static HRESULT __stdcall callback(void *cookie)
1001  {
1002  HRESULT hr = E_FAIL;
1003  if (cookie == NULL)
1004  {
1005  return hr;
1006  }
1008  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2);
1009  hr = S_OK;
1010  return hr;
1011  }
1012 };
1013 
1014 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3>
1016 {
1017  RetType (__cdecl *func)(ArgType1, ArgType2, ArgType3);
1019  ArgType1 arg1;
1020  ArgType2 arg2;
1021  ArgType3 arg3;
1022 
1023  static HRESULT __stdcall callback(void *cookie)
1024  {
1025  HRESULT hr = E_FAIL;
1026  if (cookie == NULL)
1027  {
1028  return hr;
1029  }
1031  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3);
1032  hr = S_OK;
1033  return hr;
1034  }
1035 };
1036 
1037 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
1039 {
1040  RetType (__cdecl *func)(ArgType1, ArgType2, ArgType3, ArgType4);
1042  ArgType1 arg1;
1043  ArgType2 arg2;
1044  ArgType3 arg3;
1045  ArgType4 arg4;
1046 
1047  static HRESULT __stdcall callback(void *cookie)
1048  {
1049  HRESULT hr = E_FAIL;
1050  if (cookie == NULL)
1051  {
1052  return hr;
1053  }
1055  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4);
1056  hr = S_OK;
1057  return hr;
1058  }
1059 };
1060 
1061 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
1063 {
1064  RetType (__cdecl *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5);
1066  ArgType1 arg1;
1067  ArgType2 arg2;
1068  ArgType3 arg3;
1069  ArgType4 arg4;
1070  ArgType5 arg5;
1071 
1072  static HRESULT __stdcall callback(void *cookie)
1073  {
1074  HRESULT hr = E_FAIL;
1075  if (cookie == NULL)
1076  {
1077  return hr;
1078  }
1080  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5);
1081  hr = S_OK;
1082  return hr;
1083  }
1084 };
1085 
1086 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
1088 {
1089  RetType (__cdecl *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6);
1091  ArgType1 arg1;
1092  ArgType2 arg2;
1093  ArgType3 arg3;
1094  ArgType4 arg4;
1095  ArgType5 arg5;
1096  ArgType6 arg6;
1097 
1098  static HRESULT __stdcall callback(void *cookie)
1099  {
1100  HRESULT hr = E_FAIL;
1101  if (cookie == NULL)
1102  {
1103  return hr;
1104  }
1106  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6);
1107  hr = S_OK;
1108  return hr;
1109  }
1110 };
1111 
1112 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
1114 {
1115  RetType (__cdecl *func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7);
1117  ArgType1 arg1;
1118  ArgType2 arg2;
1119  ArgType3 arg3;
1120  ArgType4 arg4;
1121  ArgType5 arg5;
1122  ArgType6 arg6;
1123  ArgType7 arg7;
1124 
1125  static HRESULT __stdcall callback(void *cookie)
1126  {
1127  HRESULT hr = E_FAIL;
1128  if (cookie == NULL)
1129  {
1130  return hr;
1131  }
1133  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7);
1134  hr = S_OK;
1135  return hr;
1136  }
1137 };
1138 
1139 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
1141 {
1144  ArgType1 arg1;
1145  ArgType2 arg2;
1146  ArgType3 arg3;
1147  ArgType4 arg4;
1148  ArgType5 arg5;
1149  ArgType6 arg6;
1150  ArgType7 arg7;
1151  ArgType8 arg8;
1152 
1153  static HRESULT __stdcall callback(void *cookie)
1154  {
1155  HRESULT hr = E_FAIL;
1156  if (cookie == NULL)
1157  {
1158  return hr;
1159  }
1161  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8);
1162  hr = S_OK;
1163  return hr;
1164  }
1165 };
1166 
1167 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
1169 {
1172  ArgType1 arg1;
1173  ArgType2 arg2;
1174  ArgType3 arg3;
1175  ArgType4 arg4;
1176  ArgType5 arg5;
1177  ArgType6 arg6;
1178  ArgType7 arg7;
1179  ArgType8 arg8;
1180  ArgType9 arg9;
1181 
1182  static HRESULT __stdcall callback(void *cookie)
1183  {
1184  HRESULT hr = E_FAIL;
1185  if (cookie == NULL)
1186  {
1187  return hr;
1188  }
1190  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9);
1191  hr = S_OK;
1192  return hr;
1193  }
1194 };
1195 
1196 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
1198 {
1201  ArgType1 arg1;
1202  ArgType2 arg2;
1203  ArgType3 arg3;
1204  ArgType4 arg4;
1205  ArgType5 arg5;
1206  ArgType6 arg6;
1207  ArgType7 arg7;
1208  ArgType8 arg8;
1209  ArgType9 arg9;
1210  ArgType10 arg10;
1211 
1212  static HRESULT __stdcall callback(void *cookie)
1213  {
1214  HRESULT hr = E_FAIL;
1215  if (cookie == NULL)
1216  {
1217  return hr;
1218  }
1220  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10);
1221  hr = S_OK;
1222  return hr;
1223  }
1224 };
1225 
1226 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
1228 {
1231  ArgType1 arg1;
1232  ArgType2 arg2;
1233  ArgType3 arg3;
1234  ArgType4 arg4;
1235  ArgType5 arg5;
1236  ArgType6 arg6;
1237  ArgType7 arg7;
1238  ArgType8 arg8;
1239  ArgType9 arg9;
1240  ArgType10 arg10;
1241  ArgType11 arg11;
1242 
1243  static HRESULT __stdcall callback(void *cookie)
1244  {
1245  HRESULT hr = E_FAIL;
1246  if (cookie == NULL)
1247  {
1248  return hr;
1249  }
1251  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11);
1252  hr = S_OK;
1253  return hr;
1254  }
1255 };
1256 
1257 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
1259 {
1262  ArgType1 arg1;
1263  ArgType2 arg2;
1264  ArgType3 arg3;
1265  ArgType4 arg4;
1266  ArgType5 arg5;
1267  ArgType6 arg6;
1268  ArgType7 arg7;
1269  ArgType8 arg8;
1270  ArgType9 arg9;
1271  ArgType10 arg10;
1272  ArgType11 arg11;
1273  ArgType12 arg12;
1274 
1275  static HRESULT __stdcall callback(void *cookie)
1276  {
1277  HRESULT hr = E_FAIL;
1278  if (cookie == NULL)
1279  {
1280  return hr;
1281  }
1283  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12);
1284  hr = S_OK;
1285  return hr;
1286  }
1287 };
1288 
1289 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
1291 {
1294  ArgType1 arg1;
1295  ArgType2 arg2;
1296  ArgType3 arg3;
1297  ArgType4 arg4;
1298  ArgType5 arg5;
1299  ArgType6 arg6;
1300  ArgType7 arg7;
1301  ArgType8 arg8;
1302  ArgType9 arg9;
1303  ArgType10 arg10;
1304  ArgType11 arg11;
1305  ArgType12 arg12;
1306  ArgType13 arg13;
1307 
1308  static HRESULT __stdcall callback(void *cookie)
1309  {
1310  HRESULT hr = E_FAIL;
1311  if (cookie == NULL)
1312  {
1313  return hr;
1314  }
1316  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13);
1317  hr = S_OK;
1318  return hr;
1319  }
1320 };
1321 
1322 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
1324 {
1327  ArgType1 arg1;
1328  ArgType2 arg2;
1329  ArgType3 arg3;
1330  ArgType4 arg4;
1331  ArgType5 arg5;
1332  ArgType6 arg6;
1333  ArgType7 arg7;
1334  ArgType8 arg8;
1335  ArgType9 arg9;
1336  ArgType10 arg10;
1337  ArgType11 arg11;
1338  ArgType12 arg12;
1339  ArgType13 arg13;
1340  ArgType14 arg14;
1341 
1342  static HRESULT __stdcall callback(void *cookie)
1343  {
1344  HRESULT hr = E_FAIL;
1345  if (cookie == NULL)
1346  {
1347  return hr;
1348  }
1350  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14);
1351  hr = S_OK;
1352  return hr;
1353  }
1354 };
1355 
1356 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
1358 {
1361  ArgType1 arg1;
1362  ArgType2 arg2;
1363  ArgType3 arg3;
1364  ArgType4 arg4;
1365  ArgType5 arg5;
1366  ArgType6 arg6;
1367  ArgType7 arg7;
1368  ArgType8 arg8;
1369  ArgType9 arg9;
1370  ArgType10 arg10;
1371  ArgType11 arg11;
1372  ArgType12 arg12;
1373  ArgType13 arg13;
1374  ArgType14 arg14;
1376 
1377  static HRESULT __stdcall callback(void *cookie)
1378  {
1379  HRESULT hr = E_FAIL;
1380  if (cookie == NULL)
1381  {
1382  return hr;
1383  }
1385  pcs->retValue = pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14, pcs->arg15);
1386  hr = S_OK;
1387  return hr;
1388  }
1389 };
1390 
1392 {
1393  void (__cdecl *func)();
1394 
1395  static HRESULT __stdcall callback(void *cookie)
1396  {
1397  HRESULT hr = E_FAIL;
1398  if (cookie == NULL)
1399  {
1400  return hr;
1401  }
1403  pcs->func();
1404  hr = S_OK;
1405  return hr;
1406  }
1407 };
1408 
1409 template <typename ArgType1>
1411 {
1412  void (__cdecl * func)(ArgType1);
1413  ArgType1 arg1;
1414 
1415  static HRESULT __stdcall callback(void *cookie)
1416  {
1417  HRESULT hr = E_FAIL;
1418  if (cookie == NULL)
1419  {
1420  return hr;
1421  }
1423  pcs->func(pcs->arg1);
1424  hr = S_OK;
1425  return hr;
1426  }
1427 };
1428 
1429 template <typename ArgType1, typename ArgType2>
1431 {
1432  void (__cdecl * func)(ArgType1, ArgType2);
1433  ArgType1 arg1;
1434  ArgType2 arg2;
1435 
1436  static HRESULT __stdcall callback(void *cookie)
1437  {
1438  HRESULT hr = E_FAIL;
1439  if (cookie == NULL)
1440  {
1441  return hr;
1442  }
1444  pcs->func(pcs->arg1, pcs->arg2);
1445  hr = S_OK;
1446  return hr;
1447  }
1448 };
1449 
1450 template <typename ArgType1, typename ArgType2, typename ArgType3>
1452 {
1453  void (__cdecl * func)(ArgType1, ArgType2, ArgType3);
1454  ArgType1 arg1;
1455  ArgType2 arg2;
1456  ArgType3 arg3;
1457 
1458  static HRESULT __stdcall callback(void *cookie)
1459  {
1460  HRESULT hr = E_FAIL;
1461  if (cookie == NULL)
1462  {
1463  return hr;
1464  }
1466  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3);
1467  hr = S_OK;
1468  return hr;
1469  }
1470 };
1471 
1472 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
1474 {
1475  void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4);
1476  ArgType1 arg1;
1477  ArgType2 arg2;
1478  ArgType3 arg3;
1479  ArgType4 arg4;
1480 
1481  static HRESULT __stdcall callback(void *cookie)
1482  {
1483  HRESULT hr = E_FAIL;
1484  if (cookie == NULL)
1485  {
1486  return hr;
1487  }
1489  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4);
1490  hr = S_OK;
1491  return hr;
1492  }
1493 };
1494 
1495 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
1497 {
1498  void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5);
1499  ArgType1 arg1;
1500  ArgType2 arg2;
1501  ArgType3 arg3;
1502  ArgType4 arg4;
1503  ArgType5 arg5;
1504 
1505  static HRESULT __stdcall callback(void *cookie)
1506  {
1507  HRESULT hr = E_FAIL;
1508  if (cookie == NULL)
1509  {
1510  return hr;
1511  }
1513  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5);
1514  hr = S_OK;
1515  return hr;
1516  }
1517 };
1518 
1519 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
1521 {
1522  void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6);
1523  ArgType1 arg1;
1524  ArgType2 arg2;
1525  ArgType3 arg3;
1526  ArgType4 arg4;
1527  ArgType5 arg5;
1528  ArgType6 arg6;
1529 
1530  static HRESULT __stdcall callback(void *cookie)
1531  {
1532  HRESULT hr = E_FAIL;
1533  if (cookie == NULL)
1534  {
1535  return hr;
1536  }
1538  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6);
1539  hr = S_OK;
1540  return hr;
1541  }
1542 };
1543 
1544 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
1546 {
1547  void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7);
1548  ArgType1 arg1;
1549  ArgType2 arg2;
1550  ArgType3 arg3;
1551  ArgType4 arg4;
1552  ArgType5 arg5;
1553  ArgType6 arg6;
1554  ArgType7 arg7;
1555 
1556  static HRESULT __stdcall callback(void *cookie)
1557  {
1558  HRESULT hr = E_FAIL;
1559  if (cookie == NULL)
1560  {
1561  return hr;
1562  }
1564  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7);
1565  hr = S_OK;
1566  return hr;
1567  }
1568 };
1569 
1570 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
1572 {
1573  void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8);
1574  ArgType1 arg1;
1575  ArgType2 arg2;
1576  ArgType3 arg3;
1577  ArgType4 arg4;
1578  ArgType5 arg5;
1579  ArgType6 arg6;
1580  ArgType7 arg7;
1581  ArgType8 arg8;
1582 
1583  static HRESULT __stdcall callback(void *cookie)
1584  {
1585  HRESULT hr = E_FAIL;
1586  if (cookie == NULL)
1587  {
1588  return hr;
1589  }
1591  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8);
1592  hr = S_OK;
1593  return hr;
1594  }
1595 };
1596 
1597 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
1599 {
1601  ArgType1 arg1;
1602  ArgType2 arg2;
1603  ArgType3 arg3;
1604  ArgType4 arg4;
1605  ArgType5 arg5;
1606  ArgType6 arg6;
1607  ArgType7 arg7;
1608  ArgType8 arg8;
1609  ArgType9 arg9;
1610 
1611  static HRESULT __stdcall callback(void *cookie)
1612  {
1613  HRESULT hr = E_FAIL;
1614  if (cookie == NULL)
1615  {
1616  return hr;
1617  }
1619  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9);
1620  hr = S_OK;
1621  return hr;
1622  }
1623 };
1624 
1625 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
1627 {
1629  ArgType1 arg1;
1630  ArgType2 arg2;
1631  ArgType3 arg3;
1632  ArgType4 arg4;
1633  ArgType5 arg5;
1634  ArgType6 arg6;
1635  ArgType7 arg7;
1636  ArgType8 arg8;
1637  ArgType9 arg9;
1638  ArgType10 arg10;
1639 
1640  static HRESULT __stdcall callback(void *cookie)
1641  {
1642  HRESULT hr = E_FAIL;
1643  if (cookie == NULL)
1644  {
1645  return hr;
1646  }
1648  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10);
1649  hr = S_OK;
1650  return hr;
1651  }
1652 };
1653 
1654 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
1656 {
1658  ArgType1 arg1;
1659  ArgType2 arg2;
1660  ArgType3 arg3;
1661  ArgType4 arg4;
1662  ArgType5 arg5;
1663  ArgType6 arg6;
1664  ArgType7 arg7;
1665  ArgType8 arg8;
1666  ArgType9 arg9;
1667  ArgType10 arg10;
1668  ArgType11 arg11;
1669 
1670  static HRESULT __stdcall callback(void *cookie)
1671  {
1672  HRESULT hr = E_FAIL;
1673  if (cookie == NULL)
1674  {
1675  return hr;
1676  }
1678  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11);
1679  hr = S_OK;
1680  return hr;
1681  }
1682 };
1683 
1684 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
1686 {
1688  ArgType1 arg1;
1689  ArgType2 arg2;
1690  ArgType3 arg3;
1691  ArgType4 arg4;
1692  ArgType5 arg5;
1693  ArgType6 arg6;
1694  ArgType7 arg7;
1695  ArgType8 arg8;
1696  ArgType9 arg9;
1697  ArgType10 arg10;
1698  ArgType11 arg11;
1699  ArgType12 arg12;
1700 
1701  static HRESULT __stdcall callback(void *cookie)
1702  {
1703  HRESULT hr = E_FAIL;
1704  if (cookie == NULL)
1705  {
1706  return hr;
1707  }
1709  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12);
1710  hr = S_OK;
1711  return hr;
1712  }
1713 };
1714 
1715 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
1717 {
1719  ArgType1 arg1;
1720  ArgType2 arg2;
1721  ArgType3 arg3;
1722  ArgType4 arg4;
1723  ArgType5 arg5;
1724  ArgType6 arg6;
1725  ArgType7 arg7;
1726  ArgType8 arg8;
1727  ArgType9 arg9;
1728  ArgType10 arg10;
1729  ArgType11 arg11;
1730  ArgType12 arg12;
1731  ArgType13 arg13;
1732 
1733  static HRESULT __stdcall callback(void *cookie)
1734  {
1735  HRESULT hr = E_FAIL;
1736  if (cookie == NULL)
1737  {
1738  return hr;
1739  }
1741  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13);
1742  hr = S_OK;
1743  return hr;
1744  }
1745 };
1746 
1747 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
1749 {
1751  ArgType1 arg1;
1752  ArgType2 arg2;
1753  ArgType3 arg3;
1754  ArgType4 arg4;
1755  ArgType5 arg5;
1756  ArgType6 arg6;
1757  ArgType7 arg7;
1758  ArgType8 arg8;
1759  ArgType9 arg9;
1760  ArgType10 arg10;
1761  ArgType11 arg11;
1762  ArgType12 arg12;
1763  ArgType13 arg13;
1764  ArgType14 arg14;
1765 
1766  static HRESULT __stdcall callback(void *cookie)
1767  {
1768  HRESULT hr = E_FAIL;
1769  if (cookie == NULL)
1770  {
1771  return hr;
1772  }
1774  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14);
1775  hr = S_OK;
1776  return hr;
1777  }
1778 };
1779 
1780 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
1782 {
1784  ArgType1 arg1;
1785  ArgType2 arg2;
1786  ArgType3 arg3;
1787  ArgType4 arg4;
1788  ArgType5 arg5;
1789  ArgType6 arg6;
1790  ArgType7 arg7;
1791  ArgType8 arg8;
1792  ArgType9 arg9;
1793  ArgType10 arg10;
1794  ArgType11 arg11;
1795  ArgType12 arg12;
1796  ArgType13 arg13;
1797  ArgType14 arg14;
1799 
1800  static HRESULT __stdcall callback(void *cookie)
1801  {
1802  HRESULT hr = E_FAIL;
1803  if (cookie == NULL)
1804  {
1805  return hr;
1806  }
1808  pcs->func(pcs->arg1, pcs->arg2, pcs->arg3, pcs->arg4, pcs->arg5, pcs->arg6, pcs->arg7, pcs->arg8, pcs->arg9, pcs->arg10, pcs->arg11, pcs->arg12, pcs->arg13, pcs->arg14, pcs->arg15);
1809  hr = S_OK;
1810  return hr;
1811  }
1812 };
1813 
1814 } // namespace _detail
1815 
1816 /* __stdcall version */
1817 #if _MSCLR_STDCALL_DISTINCT
1818 
1819 template <typename RetType>
1820 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)())
1821 {
1822  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1823  _detail::callback_stdcall_struct0<RetType> cs;
1824 
1825  // fill up the callback_stdcall_struct
1826  cs.func = func;
1827 
1828  // call the function
1829  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1830  pClrHost->Release();
1831  _detail::validate(hr);
1832 
1833  return cs.retValue;
1834 }
1835 
1836 template <typename RetType, typename ArgType1>
1837 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1), ArgType1 arg1)
1838 {
1839  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1840  _detail::callback_stdcall_struct1<RetType, ArgType1> cs;
1841 
1842  // fill up the callback_stdcall_struct
1843  cs.func = func;
1844  cs.arg1 = arg1;
1845 
1846  // call the function
1847  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1848  pClrHost->Release();
1849  _detail::validate(hr);
1850 
1851  return cs.retValue;
1852 }
1853 
1854 template <typename RetType, typename ArgType1, typename ArgType2>
1855 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2), ArgType1 arg1, ArgType2 arg2)
1856 {
1857  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1858  _detail::callback_stdcall_struct2<RetType, ArgType1, ArgType2> cs;
1859 
1860  // fill up the callback_stdcall_struct
1861  cs.func = func;
1862  cs.arg1 = arg1;
1863  cs.arg2 = arg2;
1864 
1865  // call the function
1866  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1867  pClrHost->Release();
1868  _detail::validate(hr);
1869 
1870  return cs.retValue;
1871 }
1872 
1873 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3>
1874 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3)
1875 {
1876  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1877  _detail::callback_stdcall_struct3<RetType, ArgType1, ArgType2, ArgType3> cs;
1878 
1879  // fill up the callback_stdcall_struct
1880  cs.func = func;
1881  cs.arg1 = arg1;
1882  cs.arg2 = arg2;
1883  cs.arg3 = arg3;
1884 
1885  // call the function
1886  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1887  pClrHost->Release();
1888  _detail::validate(hr);
1889 
1890  return cs.retValue;
1891 }
1892 
1893 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
1894 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4)
1895 {
1896  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1897  _detail::callback_stdcall_struct4<RetType, ArgType1, ArgType2, ArgType3, ArgType4> cs;
1898 
1899  // fill up the callback_stdcall_struct
1900  cs.func = func;
1901  cs.arg1 = arg1;
1902  cs.arg2 = arg2;
1903  cs.arg3 = arg3;
1904  cs.arg4 = arg4;
1905 
1906  // call the function
1907  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1908  pClrHost->Release();
1909  _detail::validate(hr);
1910 
1911  return cs.retValue;
1912 }
1913 
1914 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
1915 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5)
1916 {
1917  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1918  _detail::callback_stdcall_struct5<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5> cs;
1919 
1920  // fill up the callback_stdcall_struct
1921  cs.func = func;
1922  cs.arg1 = arg1;
1923  cs.arg2 = arg2;
1924  cs.arg3 = arg3;
1925  cs.arg4 = arg4;
1926  cs.arg5 = arg5;
1927 
1928  // call the function
1929  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1930  pClrHost->Release();
1931  _detail::validate(hr);
1932 
1933  return cs.retValue;
1934 }
1935 
1936 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
1937 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6)
1938 {
1939  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1940  _detail::callback_stdcall_struct6<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6> cs;
1941 
1942  // fill up the callback_stdcall_struct
1943  cs.func = func;
1944  cs.arg1 = arg1;
1945  cs.arg2 = arg2;
1946  cs.arg3 = arg3;
1947  cs.arg4 = arg4;
1948  cs.arg5 = arg5;
1949  cs.arg6 = arg6;
1950 
1951  // call the function
1952  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1953  pClrHost->Release();
1954  _detail::validate(hr);
1955 
1956  return cs.retValue;
1957 }
1958 
1959 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
1960 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7)
1961 {
1962  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1963  _detail::callback_stdcall_struct7<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7> cs;
1964 
1965  // fill up the callback_stdcall_struct
1966  cs.func = func;
1967  cs.arg1 = arg1;
1968  cs.arg2 = arg2;
1969  cs.arg3 = arg3;
1970  cs.arg4 = arg4;
1971  cs.arg5 = arg5;
1972  cs.arg6 = arg6;
1973  cs.arg7 = arg7;
1974 
1975  // call the function
1976  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
1977  pClrHost->Release();
1978  _detail::validate(hr);
1979 
1980  return cs.retValue;
1981 }
1982 
1983 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
1984 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8)
1985 {
1986  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
1987  _detail::callback_stdcall_struct8<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8> cs;
1988 
1989  // fill up the callback_stdcall_struct
1990  cs.func = func;
1991  cs.arg1 = arg1;
1992  cs.arg2 = arg2;
1993  cs.arg3 = arg3;
1994  cs.arg4 = arg4;
1995  cs.arg5 = arg5;
1996  cs.arg6 = arg6;
1997  cs.arg7 = arg7;
1998  cs.arg8 = arg8;
1999 
2000  // call the function
2001  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2002  pClrHost->Release();
2003  _detail::validate(hr);
2004 
2005  return cs.retValue;
2006 }
2007 
2008 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
2009 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9)
2010 {
2011  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2012  _detail::callback_stdcall_struct9<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9> cs;
2013 
2014  // fill up the callback_stdcall_struct
2015  cs.func = func;
2016  cs.arg1 = arg1;
2017  cs.arg2 = arg2;
2018  cs.arg3 = arg3;
2019  cs.arg4 = arg4;
2020  cs.arg5 = arg5;
2021  cs.arg6 = arg6;
2022  cs.arg7 = arg7;
2023  cs.arg8 = arg8;
2024  cs.arg9 = arg9;
2025 
2026  // call the function
2027  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2028  pClrHost->Release();
2029  _detail::validate(hr);
2030 
2031  return cs.retValue;
2032 }
2033 
2034 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
2035 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10)
2036 {
2037  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2038  _detail::callback_stdcall_struct10<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10> cs;
2039 
2040  // fill up the callback_stdcall_struct
2041  cs.func = func;
2042  cs.arg1 = arg1;
2043  cs.arg2 = arg2;
2044  cs.arg3 = arg3;
2045  cs.arg4 = arg4;
2046  cs.arg5 = arg5;
2047  cs.arg6 = arg6;
2048  cs.arg7 = arg7;
2049  cs.arg8 = arg8;
2050  cs.arg9 = arg9;
2051  cs.arg10 = arg10;
2052 
2053  // call the function
2054  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2055  pClrHost->Release();
2056  _detail::validate(hr);
2057 
2058  return cs.retValue;
2059 }
2060 
2061 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
2062 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11)
2063 {
2064  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2065  _detail::callback_stdcall_struct11<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11> cs;
2066 
2067  // fill up the callback_stdcall_struct
2068  cs.func = func;
2069  cs.arg1 = arg1;
2070  cs.arg2 = arg2;
2071  cs.arg3 = arg3;
2072  cs.arg4 = arg4;
2073  cs.arg5 = arg5;
2074  cs.arg6 = arg6;
2075  cs.arg7 = arg7;
2076  cs.arg8 = arg8;
2077  cs.arg9 = arg9;
2078  cs.arg10 = arg10;
2079  cs.arg11 = arg11;
2080 
2081  // call the function
2082  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2083  pClrHost->Release();
2084  _detail::validate(hr);
2085 
2086  return cs.retValue;
2087 }
2088 
2089 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
2090 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12)
2091 {
2092  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2093  _detail::callback_stdcall_struct12<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12> cs;
2094 
2095  // fill up the callback_stdcall_struct
2096  cs.func = func;
2097  cs.arg1 = arg1;
2098  cs.arg2 = arg2;
2099  cs.arg3 = arg3;
2100  cs.arg4 = arg4;
2101  cs.arg5 = arg5;
2102  cs.arg6 = arg6;
2103  cs.arg7 = arg7;
2104  cs.arg8 = arg8;
2105  cs.arg9 = arg9;
2106  cs.arg10 = arg10;
2107  cs.arg11 = arg11;
2108  cs.arg12 = arg12;
2109 
2110  // call the function
2111  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2112  pClrHost->Release();
2113  _detail::validate(hr);
2114 
2115  return cs.retValue;
2116 }
2117 
2118 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
2119 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13)
2120 {
2121  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2122  _detail::callback_stdcall_struct13<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13> cs;
2123 
2124  // fill up the callback_stdcall_struct
2125  cs.func = func;
2126  cs.arg1 = arg1;
2127  cs.arg2 = arg2;
2128  cs.arg3 = arg3;
2129  cs.arg4 = arg4;
2130  cs.arg5 = arg5;
2131  cs.arg6 = arg6;
2132  cs.arg7 = arg7;
2133  cs.arg8 = arg8;
2134  cs.arg9 = arg9;
2135  cs.arg10 = arg10;
2136  cs.arg11 = arg11;
2137  cs.arg12 = arg12;
2138  cs.arg13 = arg13;
2139 
2140  // call the function
2141  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2142  pClrHost->Release();
2143  _detail::validate(hr);
2144 
2145  return cs.retValue;
2146 }
2147 
2148 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
2149 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14)
2150 {
2151  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2152  _detail::callback_stdcall_struct14<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14> cs;
2153 
2154  // fill up the callback_stdcall_struct
2155  cs.func = func;
2156  cs.arg1 = arg1;
2157  cs.arg2 = arg2;
2158  cs.arg3 = arg3;
2159  cs.arg4 = arg4;
2160  cs.arg5 = arg5;
2161  cs.arg6 = arg6;
2162  cs.arg7 = arg7;
2163  cs.arg8 = arg8;
2164  cs.arg9 = arg9;
2165  cs.arg10 = arg10;
2166  cs.arg11 = arg11;
2167  cs.arg12 = arg12;
2168  cs.arg13 = arg13;
2169  cs.arg14 = arg14;
2170 
2171  // call the function
2172  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2173  pClrHost->Release();
2174  _detail::validate(hr);
2175 
2176  return cs.retValue;
2177 }
2178 
2179 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
2180 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14, ArgType15 arg15)
2181 {
2182  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2183  _detail::callback_stdcall_struct15<RetType, ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15> cs;
2184 
2185  // fill up the callback_stdcall_struct
2186  cs.func = func;
2187  cs.arg1 = arg1;
2188  cs.arg2 = arg2;
2189  cs.arg3 = arg3;
2190  cs.arg4 = arg4;
2191  cs.arg5 = arg5;
2192  cs.arg6 = arg6;
2193  cs.arg7 = arg7;
2194  cs.arg8 = arg8;
2195  cs.arg9 = arg9;
2196  cs.arg10 = arg10;
2197  cs.arg11 = arg11;
2198  cs.arg12 = arg12;
2199  cs.arg13 = arg13;
2200  cs.arg14 = arg14;
2201  cs.arg15 = arg15;
2202 
2203  // call the function
2204  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2205  pClrHost->Release();
2206  _detail::validate(hr);
2207 
2208  return cs.retValue;
2209 }
2210 
2211 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)())
2212 {
2213  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2214  _detail::callback_stdcall_void_struct0 cs;
2215 
2216  // fill up the callback_stdcall_struct
2217  cs.func = func;
2218 
2219  // call the function
2220  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2221  pClrHost->Release();
2222  _detail::validate(hr);
2223 }
2224 
2225 template <typename ArgType1>
2226 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1), ArgType1 arg1)
2227 {
2228  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2229  _detail::callback_stdcall_void_struct1<ArgType1> cs;
2230 
2231  // fill up the callback_stdcall_struct
2232  cs.func = func;
2233  cs.arg1 = arg1;
2234 
2235  // call the function
2236  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2237  pClrHost->Release();
2238  _detail::validate(hr);
2239 }
2240 
2241 template <typename ArgType1, typename ArgType2>
2242 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2), ArgType1 arg1, ArgType2 arg2)
2243 {
2244  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2245  _detail::callback_stdcall_void_struct2<ArgType1, ArgType2> cs;
2246 
2247  // fill up the callback_stdcall_struct
2248  cs.func = func;
2249  cs.arg1 = arg1;
2250  cs.arg2 = arg2;
2251 
2252  // call the function
2253  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2254  pClrHost->Release();
2255  _detail::validate(hr);
2256 }
2257 
2258 template <typename ArgType1, typename ArgType2, typename ArgType3>
2259 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3)
2260 {
2261  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2262  _detail::callback_stdcall_void_struct3<ArgType1, ArgType2, ArgType3> cs;
2263 
2264  // fill up the callback_stdcall_struct
2265  cs.func = func;
2266  cs.arg1 = arg1;
2267  cs.arg2 = arg2;
2268  cs.arg3 = arg3;
2269 
2270  // call the function
2271  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2272  pClrHost->Release();
2273  _detail::validate(hr);
2274 }
2275 
2276 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
2277 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4)
2278 {
2279  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2280  _detail::callback_stdcall_void_struct4<ArgType1, ArgType2, ArgType3, ArgType4> cs;
2281 
2282  // fill up the callback_stdcall_struct
2283  cs.func = func;
2284  cs.arg1 = arg1;
2285  cs.arg2 = arg2;
2286  cs.arg3 = arg3;
2287  cs.arg4 = arg4;
2288 
2289  // call the function
2290  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2291  pClrHost->Release();
2292  _detail::validate(hr);
2293 }
2294 
2295 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
2296 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5)
2297 {
2298  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2299  _detail::callback_stdcall_void_struct5<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5> cs;
2300 
2301  // fill up the callback_stdcall_struct
2302  cs.func = func;
2303  cs.arg1 = arg1;
2304  cs.arg2 = arg2;
2305  cs.arg3 = arg3;
2306  cs.arg4 = arg4;
2307  cs.arg5 = arg5;
2308 
2309  // call the function
2310  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2311  pClrHost->Release();
2312  _detail::validate(hr);
2313 }
2314 
2315 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
2316 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6)
2317 {
2318  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2319  _detail::callback_stdcall_void_struct6<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6> cs;
2320 
2321  // fill up the callback_stdcall_struct
2322  cs.func = func;
2323  cs.arg1 = arg1;
2324  cs.arg2 = arg2;
2325  cs.arg3 = arg3;
2326  cs.arg4 = arg4;
2327  cs.arg5 = arg5;
2328  cs.arg6 = arg6;
2329 
2330  // call the function
2331  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2332  pClrHost->Release();
2333  _detail::validate(hr);
2334 }
2335 
2336 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
2337 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7)
2338 {
2339  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2340  _detail::callback_stdcall_void_struct7<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7> cs;
2341 
2342  // fill up the callback_stdcall_struct
2343  cs.func = func;
2344  cs.arg1 = arg1;
2345  cs.arg2 = arg2;
2346  cs.arg3 = arg3;
2347  cs.arg4 = arg4;
2348  cs.arg5 = arg5;
2349  cs.arg6 = arg6;
2350  cs.arg7 = arg7;
2351 
2352  // call the function
2353  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2354  pClrHost->Release();
2355  _detail::validate(hr);
2356 }
2357 
2358 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
2359 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8)
2360 {
2361  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2362  _detail::callback_stdcall_void_struct8<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8> cs;
2363 
2364  // fill up the callback_stdcall_struct
2365  cs.func = func;
2366  cs.arg1 = arg1;
2367  cs.arg2 = arg2;
2368  cs.arg3 = arg3;
2369  cs.arg4 = arg4;
2370  cs.arg5 = arg5;
2371  cs.arg6 = arg6;
2372  cs.arg7 = arg7;
2373  cs.arg8 = arg8;
2374 
2375  // call the function
2376  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2377  pClrHost->Release();
2378  _detail::validate(hr);
2379 }
2380 
2381 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
2382 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9)
2383 {
2384  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2385  _detail::callback_stdcall_void_struct9<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9> cs;
2386 
2387  // fill up the callback_stdcall_struct
2388  cs.func = func;
2389  cs.arg1 = arg1;
2390  cs.arg2 = arg2;
2391  cs.arg3 = arg3;
2392  cs.arg4 = arg4;
2393  cs.arg5 = arg5;
2394  cs.arg6 = arg6;
2395  cs.arg7 = arg7;
2396  cs.arg8 = arg8;
2397  cs.arg9 = arg9;
2398 
2399  // call the function
2400  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2401  pClrHost->Release();
2402  _detail::validate(hr);
2403 }
2404 
2405 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
2406 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10)
2407 {
2408  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2409  _detail::callback_stdcall_void_struct10<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10> cs;
2410 
2411  // fill up the callback_stdcall_struct
2412  cs.func = func;
2413  cs.arg1 = arg1;
2414  cs.arg2 = arg2;
2415  cs.arg3 = arg3;
2416  cs.arg4 = arg4;
2417  cs.arg5 = arg5;
2418  cs.arg6 = arg6;
2419  cs.arg7 = arg7;
2420  cs.arg8 = arg8;
2421  cs.arg9 = arg9;
2422  cs.arg10 = arg10;
2423 
2424  // call the function
2425  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2426  pClrHost->Release();
2427  _detail::validate(hr);
2428 }
2429 
2430 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
2431 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11)
2432 {
2433  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2434  _detail::callback_stdcall_void_struct11<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11> cs;
2435 
2436  // fill up the callback_stdcall_struct
2437  cs.func = func;
2438  cs.arg1 = arg1;
2439  cs.arg2 = arg2;
2440  cs.arg3 = arg3;
2441  cs.arg4 = arg4;
2442  cs.arg5 = arg5;
2443  cs.arg6 = arg6;
2444  cs.arg7 = arg7;
2445  cs.arg8 = arg8;
2446  cs.arg9 = arg9;
2447  cs.arg10 = arg10;
2448  cs.arg11 = arg11;
2449 
2450  // call the function
2451  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2452  pClrHost->Release();
2453  _detail::validate(hr);
2454 }
2455 
2456 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
2457 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12)
2458 {
2459  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2460  _detail::callback_stdcall_void_struct12<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12> cs;
2461 
2462  // fill up the callback_stdcall_struct
2463  cs.func = func;
2464  cs.arg1 = arg1;
2465  cs.arg2 = arg2;
2466  cs.arg3 = arg3;
2467  cs.arg4 = arg4;
2468  cs.arg5 = arg5;
2469  cs.arg6 = arg6;
2470  cs.arg7 = arg7;
2471  cs.arg8 = arg8;
2472  cs.arg9 = arg9;
2473  cs.arg10 = arg10;
2474  cs.arg11 = arg11;
2475  cs.arg12 = arg12;
2476 
2477  // call the function
2478  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2479  pClrHost->Release();
2480  _detail::validate(hr);
2481 }
2482 
2483 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
2484 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13)
2485 {
2486  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2487  _detail::callback_stdcall_void_struct13<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13> cs;
2488 
2489  // fill up the callback_stdcall_struct
2490  cs.func = func;
2491  cs.arg1 = arg1;
2492  cs.arg2 = arg2;
2493  cs.arg3 = arg3;
2494  cs.arg4 = arg4;
2495  cs.arg5 = arg5;
2496  cs.arg6 = arg6;
2497  cs.arg7 = arg7;
2498  cs.arg8 = arg8;
2499  cs.arg9 = arg9;
2500  cs.arg10 = arg10;
2501  cs.arg11 = arg11;
2502  cs.arg12 = arg12;
2503  cs.arg13 = arg13;
2504 
2505  // call the function
2506  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2507  pClrHost->Release();
2508  _detail::validate(hr);
2509 }
2510 
2511 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
2512 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14)
2513 {
2514  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2515  _detail::callback_stdcall_void_struct14<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14> cs;
2516 
2517  // fill up the callback_stdcall_struct
2518  cs.func = func;
2519  cs.arg1 = arg1;
2520  cs.arg2 = arg2;
2521  cs.arg3 = arg3;
2522  cs.arg4 = arg4;
2523  cs.arg5 = arg5;
2524  cs.arg6 = arg6;
2525  cs.arg7 = arg7;
2526  cs.arg8 = arg8;
2527  cs.arg9 = arg9;
2528  cs.arg10 = arg10;
2529  cs.arg11 = arg11;
2530  cs.arg12 = arg12;
2531  cs.arg13 = arg13;
2532  cs.arg14 = arg14;
2533 
2534  // call the function
2535  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2536  pClrHost->Release();
2537  _detail::validate(hr);
2538 }
2539 
2540 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
2541 void inline call_in_appdomain(DWORD dwAppDomainId, void (__stdcall * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14, ArgType15 arg15)
2542 {
2543  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2544  _detail::callback_stdcall_void_struct15<ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15> cs;
2545 
2546  // fill up the callback_stdcall_struct
2547  cs.func = func;
2548  cs.arg1 = arg1;
2549  cs.arg2 = arg2;
2550  cs.arg3 = arg3;
2551  cs.arg4 = arg4;
2552  cs.arg5 = arg5;
2553  cs.arg6 = arg6;
2554  cs.arg7 = arg7;
2555  cs.arg8 = arg8;
2556  cs.arg9 = arg9;
2557  cs.arg10 = arg10;
2558  cs.arg11 = arg11;
2559  cs.arg12 = arg12;
2560  cs.arg13 = arg13;
2561  cs.arg14 = arg14;
2562  cs.arg15 = arg15;
2563 
2564  // call the function
2565  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2566  pClrHost->Release();
2567  _detail::validate(hr);
2568 }
2569 
2570 #endif /* _MSCLR_STDCALL_DISTINCT */
2571 
2572 /* __cdecl version */
2573 
2574 template <typename RetType>
2575 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)())
2576 {
2577  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2579 
2580  // fill up the callback_cdecl_struct
2581  cs.func = func;
2582 
2583  // call the function
2584  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2585  pClrHost->Release();
2586  _detail::validate(hr);
2587 
2588  return cs.retValue;
2589 }
2590 
2591 template <typename RetType, typename ArgType1>
2592 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1), ArgType1 arg1)
2593 {
2594  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2596 
2597  // fill up the callback_cdecl_struct
2598  cs.func = func;
2599  cs.arg1 = arg1;
2600 
2601  // call the function
2602  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2603  pClrHost->Release();
2604  _detail::validate(hr);
2605 
2606  return cs.retValue;
2607 }
2608 
2609 template <typename RetType, typename ArgType1, typename ArgType2>
2610 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2), ArgType1 arg1, ArgType2 arg2)
2611 {
2612  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2614 
2615  // fill up the callback_cdecl_struct
2616  cs.func = func;
2617  cs.arg1 = arg1;
2618  cs.arg2 = arg2;
2619 
2620  // call the function
2621  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2622  pClrHost->Release();
2623  _detail::validate(hr);
2624 
2625  return cs.retValue;
2626 }
2627 
2628 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3>
2629 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3)
2630 {
2631  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2633 
2634  // fill up the callback_cdecl_struct
2635  cs.func = func;
2636  cs.arg1 = arg1;
2637  cs.arg2 = arg2;
2638  cs.arg3 = arg3;
2639 
2640  // call the function
2641  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2642  pClrHost->Release();
2643  _detail::validate(hr);
2644 
2645  return cs.retValue;
2646 }
2647 
2648 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
2649 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4)
2650 {
2651  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2653 
2654  // fill up the callback_cdecl_struct
2655  cs.func = func;
2656  cs.arg1 = arg1;
2657  cs.arg2 = arg2;
2658  cs.arg3 = arg3;
2659  cs.arg4 = arg4;
2660 
2661  // call the function
2662  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2663  pClrHost->Release();
2664  _detail::validate(hr);
2665 
2666  return cs.retValue;
2667 }
2668 
2669 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
2670 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5)
2671 {
2672  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2674 
2675  // fill up the callback_cdecl_struct
2676  cs.func = func;
2677  cs.arg1 = arg1;
2678  cs.arg2 = arg2;
2679  cs.arg3 = arg3;
2680  cs.arg4 = arg4;
2681  cs.arg5 = arg5;
2682 
2683  // call the function
2684  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2685  pClrHost->Release();
2686  _detail::validate(hr);
2687 
2688  return cs.retValue;
2689 }
2690 
2691 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
2692 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6)
2693 {
2694  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2696 
2697  // fill up the callback_cdecl_struct
2698  cs.func = func;
2699  cs.arg1 = arg1;
2700  cs.arg2 = arg2;
2701  cs.arg3 = arg3;
2702  cs.arg4 = arg4;
2703  cs.arg5 = arg5;
2704  cs.arg6 = arg6;
2705 
2706  // call the function
2707  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2708  pClrHost->Release();
2709  _detail::validate(hr);
2710 
2711  return cs.retValue;
2712 }
2713 
2714 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
2715 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7)
2716 {
2717  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2719 
2720  // fill up the callback_cdecl_struct
2721  cs.func = func;
2722  cs.arg1 = arg1;
2723  cs.arg2 = arg2;
2724  cs.arg3 = arg3;
2725  cs.arg4 = arg4;
2726  cs.arg5 = arg5;
2727  cs.arg6 = arg6;
2728  cs.arg7 = arg7;
2729 
2730  // call the function
2731  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2732  pClrHost->Release();
2733  _detail::validate(hr);
2734 
2735  return cs.retValue;
2736 }
2737 
2738 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
2739 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8)
2740 {
2741  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2743 
2744  // fill up the callback_cdecl_struct
2745  cs.func = func;
2746  cs.arg1 = arg1;
2747  cs.arg2 = arg2;
2748  cs.arg3 = arg3;
2749  cs.arg4 = arg4;
2750  cs.arg5 = arg5;
2751  cs.arg6 = arg6;
2752  cs.arg7 = arg7;
2753  cs.arg8 = arg8;
2754 
2755  // call the function
2756  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2757  pClrHost->Release();
2758  _detail::validate(hr);
2759 
2760  return cs.retValue;
2761 }
2762 
2763 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
2764 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9)
2765 {
2766  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2768 
2769  // fill up the callback_cdecl_struct
2770  cs.func = func;
2771  cs.arg1 = arg1;
2772  cs.arg2 = arg2;
2773  cs.arg3 = arg3;
2774  cs.arg4 = arg4;
2775  cs.arg5 = arg5;
2776  cs.arg6 = arg6;
2777  cs.arg7 = arg7;
2778  cs.arg8 = arg8;
2779  cs.arg9 = arg9;
2780 
2781  // call the function
2782  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2783  pClrHost->Release();
2784  _detail::validate(hr);
2785 
2786  return cs.retValue;
2787 }
2788 
2789 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
2790 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10)
2791 {
2792  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2794 
2795  // fill up the callback_cdecl_struct
2796  cs.func = func;
2797  cs.arg1 = arg1;
2798  cs.arg2 = arg2;
2799  cs.arg3 = arg3;
2800  cs.arg4 = arg4;
2801  cs.arg5 = arg5;
2802  cs.arg6 = arg6;
2803  cs.arg7 = arg7;
2804  cs.arg8 = arg8;
2805  cs.arg9 = arg9;
2806  cs.arg10 = arg10;
2807 
2808  // call the function
2809  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2810  pClrHost->Release();
2811  _detail::validate(hr);
2812 
2813  return cs.retValue;
2814 }
2815 
2816 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
2817 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11)
2818 {
2819  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2821 
2822  // fill up the callback_cdecl_struct
2823  cs.func = func;
2824  cs.arg1 = arg1;
2825  cs.arg2 = arg2;
2826  cs.arg3 = arg3;
2827  cs.arg4 = arg4;
2828  cs.arg5 = arg5;
2829  cs.arg6 = arg6;
2830  cs.arg7 = arg7;
2831  cs.arg8 = arg8;
2832  cs.arg9 = arg9;
2833  cs.arg10 = arg10;
2834  cs.arg11 = arg11;
2835 
2836  // call the function
2837  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2838  pClrHost->Release();
2839  _detail::validate(hr);
2840 
2841  return cs.retValue;
2842 }
2843 
2844 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
2845 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12)
2846 {
2847  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2849 
2850  // fill up the callback_cdecl_struct
2851  cs.func = func;
2852  cs.arg1 = arg1;
2853  cs.arg2 = arg2;
2854  cs.arg3 = arg3;
2855  cs.arg4 = arg4;
2856  cs.arg5 = arg5;
2857  cs.arg6 = arg6;
2858  cs.arg7 = arg7;
2859  cs.arg8 = arg8;
2860  cs.arg9 = arg9;
2861  cs.arg10 = arg10;
2862  cs.arg11 = arg11;
2863  cs.arg12 = arg12;
2864 
2865  // call the function
2866  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2867  pClrHost->Release();
2868  _detail::validate(hr);
2869 
2870  return cs.retValue;
2871 }
2872 
2873 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
2874 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13)
2875 {
2876  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2878 
2879  // fill up the callback_cdecl_struct
2880  cs.func = func;
2881  cs.arg1 = arg1;
2882  cs.arg2 = arg2;
2883  cs.arg3 = arg3;
2884  cs.arg4 = arg4;
2885  cs.arg5 = arg5;
2886  cs.arg6 = arg6;
2887  cs.arg7 = arg7;
2888  cs.arg8 = arg8;
2889  cs.arg9 = arg9;
2890  cs.arg10 = arg10;
2891  cs.arg11 = arg11;
2892  cs.arg12 = arg12;
2893  cs.arg13 = arg13;
2894 
2895  // call the function
2896  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2897  pClrHost->Release();
2898  _detail::validate(hr);
2899 
2900  return cs.retValue;
2901 }
2902 
2903 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
2904 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14)
2905 {
2906  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2908 
2909  // fill up the callback_cdecl_struct
2910  cs.func = func;
2911  cs.arg1 = arg1;
2912  cs.arg2 = arg2;
2913  cs.arg3 = arg3;
2914  cs.arg4 = arg4;
2915  cs.arg5 = arg5;
2916  cs.arg6 = arg6;
2917  cs.arg7 = arg7;
2918  cs.arg8 = arg8;
2919  cs.arg9 = arg9;
2920  cs.arg10 = arg10;
2921  cs.arg11 = arg11;
2922  cs.arg12 = arg12;
2923  cs.arg13 = arg13;
2924  cs.arg14 = arg14;
2925 
2926  // call the function
2927  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2928  pClrHost->Release();
2929  _detail::validate(hr);
2930 
2931  return cs.retValue;
2932 }
2933 
2934 template <typename RetType, typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
2935 RetType inline call_in_appdomain(DWORD dwAppDomainId, RetType (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14, ArgType15 arg15)
2936 {
2937  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2939 
2940  // fill up the callback_cdecl_struct
2941  cs.func = func;
2942  cs.arg1 = arg1;
2943  cs.arg2 = arg2;
2944  cs.arg3 = arg3;
2945  cs.arg4 = arg4;
2946  cs.arg5 = arg5;
2947  cs.arg6 = arg6;
2948  cs.arg7 = arg7;
2949  cs.arg8 = arg8;
2950  cs.arg9 = arg9;
2951  cs.arg10 = arg10;
2952  cs.arg11 = arg11;
2953  cs.arg12 = arg12;
2954  cs.arg13 = arg13;
2955  cs.arg14 = arg14;
2956  cs.arg15 = arg15;
2957 
2958  // call the function
2959  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2960  pClrHost->Release();
2961  _detail::validate(hr);
2962 
2963  return cs.retValue;
2964 }
2965 
2966 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)())
2967 {
2968  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2970 
2971  // fill up the callback_cdecl_struct
2972  cs.func = func;
2973 
2974  // call the function
2975  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2976  pClrHost->Release();
2977  _detail::validate(hr);
2978 }
2979 
2980 template <typename ArgType1>
2981 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1), ArgType1 arg1)
2982 {
2983  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
2985 
2986  // fill up the callback_cdecl_struct
2987  cs.func = func;
2988  cs.arg1 = arg1;
2989 
2990  // call the function
2991  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
2992  pClrHost->Release();
2993  _detail::validate(hr);
2994 }
2995 
2996 template <typename ArgType1, typename ArgType2>
2997 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2), ArgType1 arg1, ArgType2 arg2)
2998 {
2999  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3001 
3002  // fill up the callback_cdecl_struct
3003  cs.func = func;
3004  cs.arg1 = arg1;
3005  cs.arg2 = arg2;
3006 
3007  // call the function
3008  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3009  pClrHost->Release();
3010  _detail::validate(hr);
3011 }
3012 
3013 template <typename ArgType1, typename ArgType2, typename ArgType3>
3014 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3)
3015 {
3016  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3018 
3019  // fill up the callback_cdecl_struct
3020  cs.func = func;
3021  cs.arg1 = arg1;
3022  cs.arg2 = arg2;
3023  cs.arg3 = arg3;
3024 
3025  // call the function
3026  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3027  pClrHost->Release();
3028  _detail::validate(hr);
3029 }
3030 
3031 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4>
3032 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4)
3033 {
3034  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3036 
3037  // fill up the callback_cdecl_struct
3038  cs.func = func;
3039  cs.arg1 = arg1;
3040  cs.arg2 = arg2;
3041  cs.arg3 = arg3;
3042  cs.arg4 = arg4;
3043 
3044  // call the function
3045  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3046  pClrHost->Release();
3047  _detail::validate(hr);
3048 }
3049 
3050 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5>
3051 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5)
3052 {
3053  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3055 
3056  // fill up the callback_cdecl_struct
3057  cs.func = func;
3058  cs.arg1 = arg1;
3059  cs.arg2 = arg2;
3060  cs.arg3 = arg3;
3061  cs.arg4 = arg4;
3062  cs.arg5 = arg5;
3063 
3064  // call the function
3065  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3066  pClrHost->Release();
3067  _detail::validate(hr);
3068 }
3069 
3070 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6>
3071 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6)
3072 {
3073  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3075 
3076  // fill up the callback_cdecl_struct
3077  cs.func = func;
3078  cs.arg1 = arg1;
3079  cs.arg2 = arg2;
3080  cs.arg3 = arg3;
3081  cs.arg4 = arg4;
3082  cs.arg5 = arg5;
3083  cs.arg6 = arg6;
3084 
3085  // call the function
3086  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3087  pClrHost->Release();
3088  _detail::validate(hr);
3089 }
3090 
3091 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7>
3092 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7)
3093 {
3094  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3096 
3097  // fill up the callback_cdecl_struct
3098  cs.func = func;
3099  cs.arg1 = arg1;
3100  cs.arg2 = arg2;
3101  cs.arg3 = arg3;
3102  cs.arg4 = arg4;
3103  cs.arg5 = arg5;
3104  cs.arg6 = arg6;
3105  cs.arg7 = arg7;
3106 
3107  // call the function
3108  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3109  pClrHost->Release();
3110  _detail::validate(hr);
3111 }
3112 
3113 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8>
3114 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8)
3115 {
3116  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3118 
3119  // fill up the callback_cdecl_struct
3120  cs.func = func;
3121  cs.arg1 = arg1;
3122  cs.arg2 = arg2;
3123  cs.arg3 = arg3;
3124  cs.arg4 = arg4;
3125  cs.arg5 = arg5;
3126  cs.arg6 = arg6;
3127  cs.arg7 = arg7;
3128  cs.arg8 = arg8;
3129 
3130  // call the function
3131  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3132  pClrHost->Release();
3133  _detail::validate(hr);
3134 }
3135 
3136 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9>
3137 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9)
3138 {
3139  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3141 
3142  // fill up the callback_cdecl_struct
3143  cs.func = func;
3144  cs.arg1 = arg1;
3145  cs.arg2 = arg2;
3146  cs.arg3 = arg3;
3147  cs.arg4 = arg4;
3148  cs.arg5 = arg5;
3149  cs.arg6 = arg6;
3150  cs.arg7 = arg7;
3151  cs.arg8 = arg8;
3152  cs.arg9 = arg9;
3153 
3154  // call the function
3155  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3156  pClrHost->Release();
3157  _detail::validate(hr);
3158 }
3159 
3160 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10>
3161 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10)
3162 {
3163  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3165 
3166  // fill up the callback_cdecl_struct
3167  cs.func = func;
3168  cs.arg1 = arg1;
3169  cs.arg2 = arg2;
3170  cs.arg3 = arg3;
3171  cs.arg4 = arg4;
3172  cs.arg5 = arg5;
3173  cs.arg6 = arg6;
3174  cs.arg7 = arg7;
3175  cs.arg8 = arg8;
3176  cs.arg9 = arg9;
3177  cs.arg10 = arg10;
3178 
3179  // call the function
3180  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3181  pClrHost->Release();
3182  _detail::validate(hr);
3183 }
3184 
3185 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11>
3186 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11)
3187 {
3188  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3190 
3191  // fill up the callback_cdecl_struct
3192  cs.func = func;
3193  cs.arg1 = arg1;
3194  cs.arg2 = arg2;
3195  cs.arg3 = arg3;
3196  cs.arg4 = arg4;
3197  cs.arg5 = arg5;
3198  cs.arg6 = arg6;
3199  cs.arg7 = arg7;
3200  cs.arg8 = arg8;
3201  cs.arg9 = arg9;
3202  cs.arg10 = arg10;
3203  cs.arg11 = arg11;
3204 
3205  // call the function
3206  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3207  pClrHost->Release();
3208  _detail::validate(hr);
3209 }
3210 
3211 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12>
3212 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12)
3213 {
3214  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3216 
3217  // fill up the callback_cdecl_struct
3218  cs.func = func;
3219  cs.arg1 = arg1;
3220  cs.arg2 = arg2;
3221  cs.arg3 = arg3;
3222  cs.arg4 = arg4;
3223  cs.arg5 = arg5;
3224  cs.arg6 = arg6;
3225  cs.arg7 = arg7;
3226  cs.arg8 = arg8;
3227  cs.arg9 = arg9;
3228  cs.arg10 = arg10;
3229  cs.arg11 = arg11;
3230  cs.arg12 = arg12;
3231 
3232  // call the function
3233  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3234  pClrHost->Release();
3235  _detail::validate(hr);
3236 }
3237 
3238 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13>
3239 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13)
3240 {
3241  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3243 
3244  // fill up the callback_cdecl_struct
3245  cs.func = func;
3246  cs.arg1 = arg1;
3247  cs.arg2 = arg2;
3248  cs.arg3 = arg3;
3249  cs.arg4 = arg4;
3250  cs.arg5 = arg5;
3251  cs.arg6 = arg6;
3252  cs.arg7 = arg7;
3253  cs.arg8 = arg8;
3254  cs.arg9 = arg9;
3255  cs.arg10 = arg10;
3256  cs.arg11 = arg11;
3257  cs.arg12 = arg12;
3258  cs.arg13 = arg13;
3259 
3260  // call the function
3261  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3262  pClrHost->Release();
3263  _detail::validate(hr);
3264 }
3265 
3266 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14>
3267 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14)
3268 {
3269  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3271 
3272  // fill up the callback_cdecl_struct
3273  cs.func = func;
3274  cs.arg1 = arg1;
3275  cs.arg2 = arg2;
3276  cs.arg3 = arg3;
3277  cs.arg4 = arg4;
3278  cs.arg5 = arg5;
3279  cs.arg6 = arg6;
3280  cs.arg7 = arg7;
3281  cs.arg8 = arg8;
3282  cs.arg9 = arg9;
3283  cs.arg10 = arg10;
3284  cs.arg11 = arg11;
3285  cs.arg12 = arg12;
3286  cs.arg13 = arg13;
3287  cs.arg14 = arg14;
3288 
3289  // call the function
3290  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3291  pClrHost->Release();
3292  _detail::validate(hr);
3293 }
3294 
3295 template <typename ArgType1, typename ArgType2, typename ArgType3, typename ArgType4, typename ArgType5, typename ArgType6, typename ArgType7, typename ArgType8, typename ArgType9, typename ArgType10, typename ArgType11, typename ArgType12, typename ArgType13, typename ArgType14, typename ArgType15>
3296 void inline call_in_appdomain(DWORD dwAppDomainId, void (__cdecl * func)(ArgType1, ArgType2, ArgType3, ArgType4, ArgType5, ArgType6, ArgType7, ArgType8, ArgType9, ArgType10, ArgType11, ArgType12, ArgType13, ArgType14, ArgType15), ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ArgType4 arg4, ArgType5 arg5, ArgType6 arg6, ArgType7 arg7, ArgType8 arg8, ArgType9 arg9, ArgType10 arg10, ArgType11 arg11, ArgType12 arg12, ArgType13 arg13, ArgType14 arg14, ArgType15 arg15)
3297 {
3298  ICLRRuntimeHost *pClrHost = _detail::get_clr_runtime_host();
3300 
3301  // fill up the callback_cdecl_struct
3302  cs.func = func;
3303  cs.arg1 = arg1;
3304  cs.arg2 = arg2;
3305  cs.arg3 = arg3;
3306  cs.arg4 = arg4;
3307  cs.arg5 = arg5;
3308  cs.arg6 = arg6;
3309  cs.arg7 = arg7;
3310  cs.arg8 = arg8;
3311  cs.arg9 = arg9;
3312  cs.arg10 = arg10;
3313  cs.arg11 = arg11;
3314  cs.arg12 = arg12;
3315  cs.arg13 = arg13;
3316  cs.arg14 = arg14;
3317  cs.arg15 = arg15;
3318 
3319  // call the function
3320  HRESULT hr = pClrHost->ExecuteInAppDomain(dwAppDomainId, &cs.callback, &cs);
3321  pClrHost->Release();
3322  _detail::validate(hr);
3323 }
3324 
3325 } // namespace msclr
3326 
3327 #define _INC_MSCLR_APPDOMAIN
3328 
3329 #endif /* !defined (_INC_MSCLR_APPDOMAIN) */
System::Guid FromGUID(GUID const &guid)
Definition: appdomain.h:55
ArgType12 arg12
Definition: appdomain.h:1699
ArgType9
Definition: appdomain.h:1260
RetType retValue
Definition: appdomain.h:1041
ArgType2 arg2
Definition: appdomain.h:1630
ArgType3 arg3
Definition: appdomain.h:1631
Definition: appdomain.h:1113
ArgType4
Definition: appdomain.h:1359
ArgType9 arg9
Definition: appdomain.h:1727
ArgType2
Definition: appdomain.h:1573
ArgType10
Definition: appdomain.h:1783
ArgType14 arg14
Definition: appdomain.h:1797
ArgType5 arg5
Definition: appdomain.h:1503
ArgType4 arg4
Definition: appdomain.h:1787
ArgType1 arg1
Definition: appdomain.h:1548
ArgType11
Definition: appdomain.h:1260
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1415
ArgType8 arg8
Definition: appdomain.h:1368
ArgType8
Definition: appdomain.h:1229
ArgType3
Definition: appdomain.h:1229
ArgType6
Definition: appdomain.h:1687
ArgType3
Definition: appdomain.h:1453
ArgType14
Definition: appdomain.h:1783
ArgType9
Definition: appdomain.h:1687
ArgType6 arg6
Definition: appdomain.h:1299
ArgType3 arg3
Definition: appdomain.h:1068
ArgType1 arg1
Definition: appdomain.h:1433
ArgType4 arg4
Definition: appdomain.h:1526
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1153
ArgType5
Definition: appdomain.h:1498
ArgType4 arg4
Definition: appdomain.h:1661
ArgType3 arg3
Definition: appdomain.h:1660
ArgType7 arg7
Definition: appdomain.h:1150
ArgType2
Definition: appdomain.h:1229
#define NULL
Definition: vcruntime.h:236
ArgType7
Definition: appdomain.h:1657
Definition: appdomain.h:1357
ArgType5
Definition: appdomain.h:1170
ArgType2
Definition: appdomain.h:1432
ArgType12 arg12
Definition: appdomain.h:1762
ArgType10 arg10
Definition: appdomain.h:1697
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1733
ArgType3
Definition: appdomain.h:1783
ArgType5 arg5
Definition: appdomain.h:1266
RetType call_in_appdomain(DWORD dwAppDomainId, RetType(__cdecl *func)())
Definition: appdomain.h:2575
ArgType2
Definition: appdomain.h:1115
ArgType9 arg9
Definition: appdomain.h:1239
#define S_OK
Definition: comutil.h:62
ArgType3 arg3
Definition: appdomain.h:1203
ArgType10 arg10
Definition: appdomain.h:1271
ArgType2 arg2
Definition: appdomain.h:1524
ArgType9 arg9
Definition: appdomain.h:1180
ArgType5
Definition: appdomain.h:1600
ArgType4
Definition: appdomain.h:1687
ArgType2 arg2
Definition: appdomain.h:1118
ICLRRuntimeHost * get_clr_runtime_host(void)
Definition: appdomain.h:65
ArgType7 arg7
Definition: appdomain.h:1300
ArgType8
Definition: appdomain.h:1657
ArgType3 arg3
Definition: appdomain.h:1550
ArgType13 arg13
Definition: appdomain.h:1339
ArgType9 arg9
Definition: appdomain.h:1637
ArgType7
Definition: appdomain.h:1687
ArgType3 arg3
Definition: appdomain.h:1456
RetType retValue
Definition: appdomain.h:955
ArgType11 arg11
Definition: appdomain.h:1304
ArgType5 arg5
Definition: appdomain.h:1121
ArgType8 arg8
Definition: appdomain.h:1636
ArgType3
Definition: appdomain.h:1359
ArgType7
Definition: appdomain.h:1199
ArgType12
Definition: appdomain.h:1292
ArgType10
Definition: appdomain.h:1199
ArgType3 arg3
Definition: appdomain.h:1296
ArgType8 arg8
Definition: appdomain.h:1758
ArgType8
Definition: appdomain.h:1718
ArgType6
Definition: appdomain.h:1115
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1212
ArgType13
Definition: appdomain.h:1359
ArgType10 arg10
Definition: appdomain.h:1240
ArgType2
Definition: appdomain.h:1142
ArgType7
Definition: appdomain.h:1325
ArgType8
Definition: appdomain.h:1573
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1098
Definition: appdomain.h:1015
ArgType2 arg2
Definition: appdomain.h:1020
ArgType11
Definition: appdomain.h:1687
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1701
ArgType9
Definition: appdomain.h:1750
ArgType14 arg14
Definition: appdomain.h:1374
ArgType2 arg2
Definition: appdomain.h:1263
ArgType8 arg8
Definition: appdomain.h:1238
ArgType10
Definition: appdomain.h:1359
ArgType5
Definition: appdomain.h:1325
ArgType1 arg1
Definition: appdomain.h:1601
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1308
ArgType3 arg3
Definition: appdomain.h:1329
ArgType1 arg1
Definition: appdomain.h:1413
ArgType1 arg1
Definition: appdomain.h:1574
ArgType2
Definition: appdomain.h:1260
ArgType9 arg9
Definition: appdomain.h:1696
ArgType10
Definition: appdomain.h:1628
ArgType7
Definition: appdomain.h:1628
ArgType9
Definition: appdomain.h:1657
ArgType7
Definition: appdomain.h:1547
ArgType2
Definition: appdomain.h:1498
ArgType11
Definition: appdomain.h:1718
ArgType3
Definition: appdomain.h:1199
ArgType3 arg3
Definition: appdomain.h:1478
ArgType11
Definition: appdomain.h:1783
ArgType11
Definition: appdomain.h:1657
ArgType4
Definition: appdomain.h:1750
ArgType6
Definition: appdomain.h:1292
ArgType15 arg15
Definition: appdomain.h:1375
ArgType7 arg7
Definition: appdomain.h:1607
Definition: gcroot.h:43
ArgType4 arg4
Definition: appdomain.h:1094
ArgType9 arg9
Definition: appdomain.h:1759
ArgType4
Definition: appdomain.h:1522
ArgType9
Definition: appdomain.h:1628
ArgType1 arg1
Definition: appdomain.h:1231
Definition: appdomain.h:1140
ArgType1 arg1
Definition: appdomain.h:1327
ArgType8 arg8
Definition: appdomain.h:1208
RetType retValue
Definition: appdomain.h:1090
ArgType6 arg6
Definition: appdomain.h:1693
ArgType1 arg1
Definition: appdomain.h:1294
ArgType2 arg2
Definition: appdomain.h:1362
ArgType2
Definition: appdomain.h:1547
ArgType4
Definition: appdomain.h:1260
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1395
ArgType1 arg1
Definition: appdomain.h:1042
ArgType1 arg1
Definition: appdomain.h:1117
RetType retValue
Definition: appdomain.h:1261
ArgType11 arg11
Definition: appdomain.h:1761
ArgType4
Definition: appdomain.h:1547
ArgType6
Definition: appdomain.h:1657
ArgType12 arg12
Definition: appdomain.h:1305
ArgType5 arg5
Definition: appdomain.h:1552
ArgType12
Definition: appdomain.h:1260
ArgType2 arg2
Definition: appdomain.h:1092
ArgType2
Definition: appdomain.h:1750
ArgType7
Definition: appdomain.h:1170
ArgType4 arg4
Definition: appdomain.h:1147
ArgType7 arg7
Definition: appdomain.h:1580
ArgType2 arg2
Definition: appdomain.h:1232
ArgType6 arg6
Definition: appdomain.h:1236
ArgType4 arg4
Definition: appdomain.h:1577
ArgType3 arg3
Definition: appdomain.h:1525
ArgType5 arg5
Definition: appdomain.h:1633
ArgType9
Definition: appdomain.h:1292
ArgType5
Definition: appdomain.h:1718
RetType retValue
Definition: appdomain.h:1116
ArgType11 arg11
Definition: appdomain.h:1668
Definition: appdomain.h:1323
ArgType5
Definition: appdomain.h:1687
ArgType8
Definition: appdomain.h:1170
ArgType6 arg6
Definition: appdomain.h:1149
ArgType11
Definition: appdomain.h:1292
ArgType11
Definition: appdomain.h:1229
ArgType5 arg5
Definition: appdomain.h:1365
ArgType2
Definition: appdomain.h:1475
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1556
RetType retValue
Definition: appdomain.h:1293
ArgType2
Definition: appdomain.h:1292
ArgType6
Definition: appdomain.h:1229
RetType retValue
Definition: appdomain.h:1230
ArgType8
Definition: appdomain.h:1687
ArgType6
Definition: appdomain.h:1600
ArgType6
Definition: appdomain.h:1325
ArgType7 arg7
Definition: appdomain.h:1694
ArgType1 arg1
Definition: appdomain.h:976
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1047
ArgType9
Definition: appdomain.h:1600
ArgType2
Definition: appdomain.h:1089
ArgType12
Definition: appdomain.h:1325
ArgType5 arg5
Definition: appdomain.h:1331
ArgType2 arg2
Definition: appdomain.h:1500
ArgType3
Definition: appdomain.h:1017
ArgType6 arg6
Definition: appdomain.h:1528
ArgType10 arg10
Definition: appdomain.h:1303
ArgType8
Definition: appdomain.h:1783
ArgType9
Definition: appdomain.h:1170
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1243
ArgType12
Definition: appdomain.h:1783
ArgType5 arg5
Definition: appdomain.h:1205
ArgType4
Definition: appdomain.h:1229
ArgType1 arg1
Definition: appdomain.h:1499
ArgType10
Definition: appdomain.h:1657
ArgType4 arg4
Definition: appdomain.h:1479
ArgType3
Definition: appdomain.h:1040
ArgType5
Definition: appdomain.h:1115
ArgType13
Definition: appdomain.h:1292
ArgType11 arg11
Definition: appdomain.h:1729
ArgType15
Definition: appdomain.h:1783
ArgType12 arg12
Definition: appdomain.h:1273
ArgType10 arg10
Definition: appdomain.h:1793
ArgType10
Definition: appdomain.h:1260
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:978
ArgType6
Definition: appdomain.h:1359
ArgType6 arg6
Definition: appdomain.h:1206
ArgType7
Definition: appdomain.h:1600
ArgType4
Definition: appdomain.h:1718
ArgType10 arg10
Definition: appdomain.h:1370
ArgType8 arg8
Definition: appdomain.h:1269
ArgType3
Definition: appdomain.h:1547
Definition: appdomain.h:1038
RetType retValue
Definition: appdomain.h:996
ArgType9 arg9
Definition: appdomain.h:1270
ArgType2
Definition: appdomain.h:1687
ArgType5
Definition: appdomain.h:1573
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1342
ArgType14 arg14
Definition: appdomain.h:1340
ArgType5 arg5
Definition: appdomain.h:1605
ArgType12
Definition: appdomain.h:1718
ArgType1 arg1
Definition: appdomain.h:1784
ArgType3
Definition: appdomain.h:1325
ArgType10
Definition: appdomain.h:1750
ArgType6
Definition: appdomain.h:1170
ArgType2
Definition: appdomain.h:1017
ArgType10 arg10
Definition: appdomain.h:1638
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1182
ArgType2
Definition: appdomain.h:1199
ArgType4 arg4
Definition: appdomain.h:1604
ArgType10
Definition: appdomain.h:1229
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1640
ArgType10
Definition: appdomain.h:1718
ArgType13
Definition: appdomain.h:1718
ArgType7
Definition: appdomain.h:1142
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1436
ArgType3 arg3
Definition: appdomain.h:1174
ArgType7
Definition: appdomain.h:1718
ArgType6 arg6
Definition: appdomain.h:1122
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1670
ArgType2 arg2
Definition: appdomain.h:1043
ArgType4
Definition: appdomain.h:1498
ArgType8
Definition: appdomain.h:1260
ArgType6 arg6
Definition: appdomain.h:1756
Definition: appdomain.h:1258
RetType retValue
Definition: appdomain.h:975
ArgType5 arg5
Definition: appdomain.h:1788
ArgType12
Definition: appdomain.h:1687
ArgType8
Definition: appdomain.h:1628
Definition: appdomain.h:1168
ArgType2 arg2
Definition: appdomain.h:1455
ArgType2
Definition: appdomain.h:1522
ArgType2
Definition: appdomain.h:1064
ArgType1 arg1
Definition: appdomain.h:1144
ArgType10
Definition: appdomain.h:1325
ArgType2 arg2
Definition: appdomain.h:1785
ArgType1 arg1
Definition: appdomain.h:1019
ArgType10
Definition: appdomain.h:1687
ArgType2 arg2
Definition: appdomain.h:1689
ArgType5 arg5
Definition: appdomain.h:1148
ArgType4
Definition: appdomain.h:1089
ArgType6
Definition: appdomain.h:1628
ArgType8
Definition: appdomain.h:1325
ArgType1 arg1
Definition: appdomain.h:1454
ArgType6
Definition: appdomain.h:1783
ArgType5
Definition: appdomain.h:1657
#define FAILED(hr)
Definition: comutil.h:71
ArgType3
Definition: appdomain.h:1718
Definition: appdomain.h:1290
ArgType13 arg13
Definition: appdomain.h:1373
RetType retValue
Definition: appdomain.h:1360
ArgType8
Definition: appdomain.h:1292
RetType retValue
Definition: appdomain.h:1018
ArgType2 arg2
Definition: appdomain.h:1145
ArgType2
Definition: appdomain.h:1718
Definition: appdomain.h:952
ArgType5 arg5
Definition: appdomain.h:1298
ArgType7 arg7
Definition: appdomain.h:1123
ArgType7
Definition: appdomain.h:1359
ArgType2 arg2
Definition: appdomain.h:1202
ArgType15
Definition: appdomain.h:1359
ArgType4
Definition: appdomain.h:1325
ArgType3
Definition: appdomain.h:1498
ArgType5
Definition: appdomain.h:1547
ArgType8
Definition: appdomain.h:1199
ArgType3 arg3
Definition: appdomain.h:1363
ArgType5 arg5
Definition: appdomain.h:1235
ArgType6 arg6
Definition: appdomain.h:1634
ArgType4 arg4
Definition: appdomain.h:1754
ArgType6 arg6
Definition: appdomain.h:1553
ArgType10 arg10
Definition: appdomain.h:1760
ArgType4 arg4
Definition: appdomain.h:1297
ArgType1 arg1
Definition: appdomain.h:1201
ArgType11 arg11
Definition: appdomain.h:1371
ArgType5
Definition: appdomain.h:1359
ArgType4 arg4
Definition: appdomain.h:1551
ArgType7 arg7
Definition: appdomain.h:1268
ArgType7
Definition: appdomain.h:1229
ArgType13 arg13
Definition: appdomain.h:1763
ArgType4
Definition: appdomain.h:1170
ArgType6 arg6
Definition: appdomain.h:1332
ArgType2
Definition: appdomain.h:1040
ArgType2 arg2
Definition: appdomain.h:1549
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1611
ArgType4
Definition: appdomain.h:1600
ArgType4 arg4
Definition: appdomain.h:1502
ArgType4 arg4
Definition: appdomain.h:1722
ArgType9
Definition: appdomain.h:1199
ArgType6 arg6
Definition: appdomain.h:1267
Definition: appdomain.h:1062
ArgType5
Definition: appdomain.h:1522
ArgType9 arg9
Definition: appdomain.h:1609
ArgType1 arg1
Definition: appdomain.h:1688
ArgType7 arg7
Definition: appdomain.h:1757
ArgType8 arg8
Definition: appdomain.h:1581
ArgType3
Definition: appdomain.h:1115
ArgType5
Definition: appdomain.h:1628
ArgType7
Definition: appdomain.h:1573
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1458
unsigned long DWORD
Definition: concrt.h:63
ArgType6
Definition: appdomain.h:1750
ArgType1 arg1
Definition: appdomain.h:1523
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1377
ArgType4 arg4
Definition: appdomain.h:1204
ArgType6 arg6
Definition: appdomain.h:1606
ArgType8 arg8
Definition: appdomain.h:1726
ArgType2
Definition: appdomain.h:1170
ArgType2
Definition: appdomain.h:1453
ArgType11 arg11
Definition: appdomain.h:1272
ArgType4 arg4
Definition: appdomain.h:1234
ArgType7 arg7
Definition: appdomain.h:1333
ArgType5
Definition: appdomain.h:1292
ArgType2 arg2
Definition: appdomain.h:998
ArgType7 arg7
Definition: appdomain.h:1237
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1072
ArgType3
Definition: appdomain.h:1573
Definition: appdomain.h:1227
ArgType11
Definition: appdomain.h:1325
ArgType6 arg6
Definition: appdomain.h:1663
ArgType12 arg12
Definition: appdomain.h:1338
ArgType8 arg8
Definition: appdomain.h:1179
ArgType3 arg3
Definition: appdomain.h:1690
ArgType14 arg14
Definition: appdomain.h:1764
ArgType7 arg7
Definition: appdomain.h:1635
ArgType3 arg3
Definition: appdomain.h:1786
ArgType7
Definition: appdomain.h:1292
RetType retValue
Definition: appdomain.h:1143
ArgType4
Definition: appdomain.h:1115
ArgType1 arg1
Definition: appdomain.h:1476
ArgType2
Definition: appdomain.h:1628
ArgType7 arg7
Definition: appdomain.h:1725
ArgType12
Definition: appdomain.h:1750
ArgType3
Definition: appdomain.h:1089
ArgType9 arg9
Definition: appdomain.h:1335
ArgType6
Definition: appdomain.h:1522
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1275
ArgType1 arg1
Definition: appdomain.h:1719
ArgType7 arg7
Definition: appdomain.h:1367
ArgType14
Definition: appdomain.h:1750
RetType retValue
Definition: appdomain.h:1326
ArgType10 arg10
Definition: appdomain.h:1336
ArgType4 arg4
Definition: appdomain.h:1175
ArgType3
Definition: appdomain.h:1170
ArgType9
Definition: appdomain.h:1359
ArgType2 arg2
Definition: appdomain.h:1173
ArgType7
Definition: appdomain.h:1260
Definition: appdomain.h:972
RetType(__cdecl *func)(ArgType1)
ArgType5 arg5
Definition: appdomain.h:1070
ArgType3
Definition: appdomain.h:1260
ArgType2
Definition: appdomain.h:995
ArgType1 arg1
Definition: appdomain.h:1091
ArgType3 arg3
Definition: appdomain.h:1501
ArgType11 arg11
Definition: appdomain.h:1241
ArgType7 arg7
Definition: appdomain.h:1664
ArgType8 arg8
Definition: appdomain.h:1301
ArgType8
Definition: appdomain.h:1750
ArgType3
Definition: appdomain.h:1750
ArgType12 arg12
Definition: appdomain.h:1795
ArgType9 arg9
Definition: appdomain.h:1302
ArgType2 arg2
Definition: appdomain.h:1575
ArgType2
Definition: appdomain.h:1600
ArgType8
Definition: appdomain.h:1600
ArgType3 arg3
Definition: appdomain.h:1576
ArgType9 arg9
Definition: appdomain.h:1209
ArgType13 arg13
Definition: appdomain.h:1731
ArgType5
Definition: appdomain.h:1260
ArgType3
Definition: appdomain.h:1600
ArgType10 arg10
Definition: appdomain.h:1667
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1023
ArgType1 arg1
Definition: appdomain.h:1172
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1530
ArgType1 arg1
Definition: appdomain.h:1066
ArgType4 arg4
Definition: appdomain.h:1364
ArgType4
Definition: appdomain.h:1292
ArgType5
Definition: appdomain.h:1783
ArgType4
Definition: appdomain.h:1783
ArgType6 arg6
Definition: appdomain.h:1096
ArgType9
Definition: appdomain.h:1718
ArgType7
Definition: appdomain.h:1750
ArgType9
Definition: appdomain.h:1325
ArgType9 arg9
Definition: appdomain.h:1792
ArgType1 arg1
Definition: appdomain.h:1658
ArgType3 arg3
Definition: appdomain.h:1119
ArgType2 arg2
Definition: appdomain.h:1295
ArgType9 arg9
Definition: appdomain.h:1666
ArgType7 arg7
Definition: appdomain.h:1554
ArgType4 arg4
Definition: appdomain.h:1120
ArgType3
Definition: appdomain.h:1628
ArgType3 arg3
Definition: appdomain.h:1753
ArgType3
Definition: appdomain.h:1475
Definition: appdomain.h:1087
ArgType5 arg5
Definition: appdomain.h:1755
ArgType4
Definition: appdomain.h:1142
ArgType6
Definition: appdomain.h:1199
ArgType7
Definition: appdomain.h:1115
RetType retValue
Definition: appdomain.h:1200
ArgType1 arg1
Definition: appdomain.h:1361
ArgType11
Definition: appdomain.h:1359
ArgType11 arg11
Definition: appdomain.h:1794
ArgType1 arg1
Definition: appdomain.h:1751
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1000
ArgType6
Definition: appdomain.h:1573
ArgType9
Definition: appdomain.h:1783
ArgType7 arg7
Definition: appdomain.h:1178
ArgType12 arg12
Definition: appdomain.h:1730
ArgType2 arg2
Definition: appdomain.h:1434
ArgType2 arg2
Definition: appdomain.h:1067
ArgType6 arg6
Definition: appdomain.h:1177
ArgType15 arg15
Definition: appdomain.h:1798
ArgType5
Definition: appdomain.h:1229
ArgType5 arg5
Definition: appdomain.h:1527
ArgType2 arg2
Definition: appdomain.h:1328
ArgType13
Definition: appdomain.h:1783
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
ArgType6
Definition: appdomain.h:1142
ArgType6 arg6
Definition: appdomain.h:1579
ArgType3 arg3
Definition: appdomain.h:1233
ArgType8
Definition: appdomain.h:1142
RetType retValue
Definition: appdomain.h:1065
ArgType5
Definition: appdomain.h:1089
ArgType9 arg9
Definition: appdomain.h:1369
ArgType2 arg2
Definition: appdomain.h:1752
ArgType3
Definition: appdomain.h:1522
ArgType1 arg1
Definition: appdomain.h:1629
ArgType1 arg1
Definition: appdomain.h:1262
ArgType14
Definition: appdomain.h:1359
ArgType4
Definition: appdomain.h:1573
ArgType4
Definition: appdomain.h:1199
ArgType5
Definition: appdomain.h:1142
ArgType5 arg5
Definition: appdomain.h:1095
Definition: appdomain.h:1197
ArgType3 arg3
Definition: appdomain.h:1264
ArgType3
Definition: appdomain.h:1292
ArgType10 arg10
Definition: appdomain.h:1210
ArgType6 arg6
Definition: appdomain.h:1724
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1125
ArgType7 arg7
Definition: appdomain.h:1207
ArgType4 arg4
Definition: appdomain.h:1265
ArgType11 arg11
Definition: appdomain.h:1698
ArgType11 arg11
Definition: appdomain.h:1337
ArgType9
Definition: appdomain.h:1229
ArgType2 arg2
Definition: appdomain.h:1659
ArgType8 arg8
Definition: appdomain.h:1695
ArgType5 arg5
Definition: appdomain.h:1692
ArgType7 arg7
Definition: appdomain.h:1790
ArgType4
Definition: appdomain.h:1628
ArgType8 arg8
Definition: appdomain.h:1151
ArgType5
Definition: appdomain.h:1199
ArgType2 arg2
Definition: appdomain.h:1602
ArgType8 arg8
Definition: appdomain.h:1608
ArgType5 arg5
Definition: appdomain.h:1723
ArgType5 arg5
Definition: appdomain.h:1578
ArgType10
Definition: appdomain.h:1292
ArgType4
Definition: appdomain.h:1040
ArgType5 arg5
Definition: appdomain.h:1662
ArgType3 arg3
Definition: appdomain.h:1093
ArgType13 arg13
Definition: appdomain.h:1796
ArgType3
Definition: appdomain.h:1064
ArgType5
Definition: appdomain.h:1750
ArgType14
Definition: appdomain.h:1325
ArgType6 arg6
Definition: appdomain.h:1366
ArgType2
Definition: appdomain.h:1657
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1766
ArgType10 arg10
Definition: appdomain.h:1728
ArgType13
Definition: appdomain.h:1750
ArgType3 arg3
Definition: appdomain.h:1044
ArgType12 arg12
Definition: appdomain.h:1372
Definition: appdomain.h:993
ArgType3 arg3
Definition: appdomain.h:1021
ArgType4 arg4
Definition: appdomain.h:1632
ArgType6
Definition: appdomain.h:1089
ArgType4 arg4
Definition: appdomain.h:1330
ArgType3 arg3
Definition: appdomain.h:1603
ArgType2
Definition: appdomain.h:1783
ArgType3 arg3
Definition: appdomain.h:1721
ArgType12
Definition: appdomain.h:1359
ArgType13 arg13
Definition: appdomain.h:1306
ArgType4 arg4
Definition: appdomain.h:1045
ArgType4
Definition: appdomain.h:1657
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1481
RetType retValue
Definition: appdomain.h:1171
ArgType6
Definition: appdomain.h:1718
void validate(HRESULT hr)
Definition: appdomain.h:45
ArgType3
Definition: appdomain.h:1687
ArgType4 arg4
Definition: appdomain.h:1069
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1583
ArgType6
Definition: appdomain.h:1547
ArgType3
Definition: appdomain.h:1142
ArgType7
Definition: appdomain.h:1783
ArgType13
Definition: appdomain.h:1325
ArgType11
Definition: appdomain.h:1750
ArgType4
Definition: appdomain.h:1064
ArgType4
Definition: appdomain.h:1475
ArgType2 arg2
Definition: appdomain.h:1720
ArgType2
Definition: appdomain.h:1325
ArgType1 arg1
Definition: appdomain.h:997
ArgType2
Definition: appdomain.h:1359
ArgType5
Definition: appdomain.h:1064
ArgType8 arg8
Definition: appdomain.h:1334
ArgType5 arg5
Definition: appdomain.h:1176
ArgType8 arg8
Definition: appdomain.h:1791
ArgType2 arg2
Definition: appdomain.h:1477
ArgType3 arg3
Definition: appdomain.h:1146
ArgType3
Definition: appdomain.h:1657
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:957
ArgType6
Definition: appdomain.h:1260
ArgType6 arg6
Definition: appdomain.h:1789
ArgType8
Definition: appdomain.h:1359
ArgType4 arg4
Definition: appdomain.h:1691
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1505
ArgType8 arg8
Definition: appdomain.h:1665
static HRESULT __stdcall callback(void *cookie)
Definition: appdomain.h:1800