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
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace TestApp
{
public class Export
{
#region Export
#if DEBUG
[DllImport("MyGUI_RenderWindow_Export_d.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Initialise();
[DllImport("MyGUI_RenderWindow_Export_d.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_AddFrameDelegate(HandleFrameStart _delegate);
[DllImport("MyGUI_RenderWindow_Export_d.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Run();
[DllImport("MyGUI_RenderWindow_Export_d.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Shutdown();
#else
[DllImport("MyGUI_RenderWindow_Export.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Initialise();
[DllImport("MyGUI_RenderWindow_Export.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_AddFrameDelegate(HandleFrameStart _delegate);
[DllImport("MyGUI_RenderWindow_Export.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Run();
[DllImport("MyGUI_RenderWindow_Export.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportDemo_Shutdown();
#endif
#endregion
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
public delegate void HandleFrameStart(float _time);
public static void Initialise()
{
ExportDemo_Initialise();
}
public static void AddFrameDelegate(HandleFrameStart _delegate)
{
ExportDemo_AddFrameDelegate(_delegate);
}
public static void Run()
{
ExportDemo_Run();
}
public static void Shutdown()
{
ExportDemo_Shutdown();
}
}
}
|