Path: blob/master/modules/mono/thirdparty/coreclr_delegates.h
10278 views
// Licensed to the .NET Foundation under one or more agreements.1// The .NET Foundation licenses this file to you under the MIT license.23#ifndef __CORECLR_DELEGATES_H__4#define __CORECLR_DELEGATES_H__56#include <stdint.h>78#if defined(_WIN32)9#define CORECLR_DELEGATE_CALLTYPE __stdcall10#ifdef _WCHAR_T_DEFINED11typedef wchar_t char_t;12#else13typedef unsigned short char_t;14#endif15#else16#define CORECLR_DELEGATE_CALLTYPE17typedef char char_t;18#endif1920#define UNMANAGEDCALLERSONLY_METHOD ((const char_t*)-1)2122// Signature of delegate returned by coreclr_delegate_type::load_assembly_and_get_function_pointer23typedef int (CORECLR_DELEGATE_CALLTYPE *load_assembly_and_get_function_pointer_fn)(24const char_t *assembly_path /* Fully qualified path to assembly */,25const char_t *type_name /* Assembly qualified type name */,26const char_t *method_name /* Public static method name compatible with delegateType */,27const char_t *delegate_type_name /* Assembly qualified delegate type name or null28or UNMANAGEDCALLERSONLY_METHOD if the method is marked with29the UnmanagedCallersOnlyAttribute. */,30void *reserved /* Extensibility parameter (currently unused and must be 0) */,31/*out*/ void **delegate /* Pointer where to store the function pointer result */);3233// Signature of delegate returned by load_assembly_and_get_function_pointer_fn when delegate_type_name == null (default)34typedef int (CORECLR_DELEGATE_CALLTYPE *component_entry_point_fn)(void *arg, int32_t arg_size_in_bytes);3536typedef int (CORECLR_DELEGATE_CALLTYPE *get_function_pointer_fn)(37const char_t *type_name /* Assembly qualified type name */,38const char_t *method_name /* Public static method name compatible with delegateType */,39const char_t *delegate_type_name /* Assembly qualified delegate type name or null,40or UNMANAGEDCALLERSONLY_METHOD if the method is marked with41the UnmanagedCallersOnlyAttribute. */,42void *load_context /* Extensibility parameter (currently unused and must be 0) */,43void *reserved /* Extensibility parameter (currently unused and must be 0) */,44/*out*/ void **delegate /* Pointer where to store the function pointer result */);4546#endif // __CORECLR_DELEGATES_H__474849