Пример #1
0
        public static IntPtr GetDelegate(VkInstance inst, string name)
        {
            byte[]   n   = System.Text.Encoding.UTF8.GetBytes(name + '\0');
            GCHandle hnd = GCHandle.Alloc(n, GCHandleType.Pinned);
            IntPtr   del = Vk.vkGetInstanceProcAddr(inst, hnd.AddrOfPinnedObject());

            if (del == IntPtr.Zero)
            {
                Console.WriteLine("instance function pointer not found for " + name);
            }
            hnd.Free();
            return(del);
        }