Exemplo n.º 1
0
        public nint Load(int slot, string entryPoint)
        {
#if DEBUG
            Debug.Assert(_initialized, "Cannot load from uninitialized VTable");
#endif
            return(_entryPoints.GetOrAdd(slot, i =>
            {
                var v = _ctx.GetProcAddress(entryPoint);

                if (v == 0)
                {
                    ThrowEntryPointNotFound(entryPoint, i);
                }

                return v;
            }));
        }
Exemplo n.º 2
0
 protected override IntPtr CoreLoadFunctionPointer(IntPtr handle, string functionName)
 => _ctx.GetProcAddress(functionName);