add logging and use smart pointers for buffers.

This commit is contained in:
hecomi
2016-11-09 19:40:05 +09:00
parent 43ba445623
commit 620762dba7
16 changed files with 214 additions and 90 deletions
@@ -42,6 +42,7 @@ public enum MonitorState
public static class Lib
{
public delegate void MessageHandler(Message message);
public delegate void DebugLogDelegate(string str);
[DllImport("uDesktopDuplication")]
public static extern void InitializeUDD();
@@ -54,6 +55,14 @@ public static class Lib
[DllImport("uDesktopDuplication")]
public static extern Message PopMessage();
[DllImport("uDesktopDuplication")]
public static extern void EnableDebug();
[DllImport("uDesktopDuplication")]
public static extern void DisableDebug();
[DllImport("uDesktopDuplication")]
public static extern void SetLogFunc(DebugLogDelegate func);
[DllImport("uDesktopDuplication")]
public static extern void SetErrorFunc(DebugLogDelegate func);
[DllImport("uDesktopDuplication")]
public static extern int GetMonitorCount();
[DllImport("uDesktopDuplication")]
public static extern int GetCursorMonitorId();