AGS.Editor.NativeProxy.GetProcAddress C# (CSharp) Метод

GetProcAddress() приватный Метод

private GetProcAddress ( IntPtr hModule, string procedureName ) : IntPtr
hModule System.IntPtr
procedureName string
Результат System.IntPtr
        public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);

Usage Example

Пример #1
0
        private Delegate GetManagedDelegateForFunction(string functionName, Type delegateType, bool mustExist)
        {
            IntPtr pAddressOfFunctionToCall = NativeProxy.GetProcAddress(_dllHandle, functionName);

            if (pAddressOfFunctionToCall == IntPtr.Zero)
            {
                if (mustExist)
                {
                    throw new AGSEditorException("Function '" + functionName + "' not exported from plugin");
                }
                return(null);
            }

            return(Marshal.GetDelegateForFunctionPointer(pAddressOfFunctionToCall, delegateType));
        }