Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.InteropServices;
- namespace Win32
- {
- class Kernel32
- {
- [DllImport("kernel32.dll", SetLastError = true)]
- public static extern IntPtr HeapAlloc(IntPtr hHeap, uint dwFlags, UIntPtr dwBytes);
- [DllImport("kernel32.dll", SetLastError = true)]
- public static extern IntPtr GetProcessHeap();
- [DllImport("kernel32.dll", SetLastError = true)]
- public static extern bool HeapFree(IntPtr hHeap, uint dwFlags, IntPtr lpMem);
- }
- public unsafe class D3D9
- {
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public unsafe struct IDirect3D9
- {
- public IntPtr* VFTable;
- }
- [StructLayout(LayoutKind.Sequential, Pack = 4)]
- public unsafe struct IDirect3D9Ex
- {
- public IntPtr* VFTable;
- }
- [DllImport("d3d9.dll", EntryPoint = "Direct3DCreate9", CallingConvention = CallingConvention.StdCall), System.Security.SuppressUnmanagedCodeSecurity]
- public static extern IDirect3D9* Direct3DCreate9(ushort SDKVersion);
- [DllImport("d3d9.dll", EntryPoint = "Direct3DCreate9Ex", CallingConvention = CallingConvention.StdCall), System.Security.SuppressUnmanagedCodeSecurity]
- public static extern int Direct3DCreate9Ex(ushort SDKVersion, [Out] out IDirect3D9Ex ex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement