1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| namespace demo_realtimesolution
{
class openglics
{
IntPtr hLic;
//[System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
IntPtr emuleload(IntPtr param,IntPtr hWnd,int sizemaster,IntPtr master,int sizechild,IntPtr child,IntPtr password,IntPtr infomaster,IntPtr infochild,ref UInt32 errmaster,ref UInt32 errchild)
{
return IntPtr.Zero;
}
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential,
Pack = 1)]
public unsafe struct in_open
{
public char* idopen;
public char* soft;
public UInt32 highver;
public UInt32 lowver;
public bool showerror;
public void* ext;
}
public unsafe struct io_info
{
public void* defaut;
public void* software;
public void* param;
}
public unsafe struct misc
{
public bool releaseafteropen;
}
public unsafe struct out_error
{
public UInt32 errmaster;
public UInt32 errchild;
}
public unsafe struct OPENGLICS_APILOAD
{
public int sizecb;
public IntPtr hWnd;
public in_open varin_open;
public io_info vario_info;
public misc var_misc;
public out_error var_outerror;
[System.Runtime.InteropServices.UnmanagedFunctionPointer(System.Runtime.InteropServices.CallingConvention.StdCall)]
public delegate IntPtr loadlicense(IntPtr param, IntPtr hWnd, int sizemaster, IntPtr master, int sizechild, IntPtr child, char* password, void* infomaster, void* infochild, ref UInt32 errmaster, ref UInt32 errchild);
public loadlicense li;
}
void LoadLicense()
{
unsafe
{
OPENGLICS_APILOAD on = new OPENGLICS_APILOAD();
//on.sizecb = on.s
on.varin_open.idopen = null;
on.varin_open.highver = 1;
on.varin_open.lowver = 3;
on.varin_open.showerror = true;
// char[] soft=string.to
on.varin_open.soft = (char*)(void*)System.Runtime.InteropServices.Marshal.StringToHGlobalAnsi("STRING");
//apiload.io_info.defaut = &lic_solumaze;
on.vario_info.defaut = null;
on.li = emuleload; //INTERESSANT ICI !!! ERREUR CS0123
}
}
}
} |
Partager