123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- using System;
- using System.Runtime.InteropServices;
- namespace Vinno.vCloud.FIS.CrossPlatform.Windows.RTMPSDK
- {
- /// <summary>
- /// NTSmartLog 的摘要说明。
- /// </summary>
- public class NTSmartLog_x64
- {
- /*
- 设置日志目录,Windows平台请设置宽字符,比如"D:\\xxx\gg"
- */
- [DllImport(@"x64\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetPath([MarshalAs(UnmanagedType.LPWStr)] String path);
- /*
- 设置日志等级,level请参考SL_LOG_LEVEL
- */
- [DllImport(@"x64\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetLevel(UInt32 level);
- /*
- 将缓冲全部写入
- */
- [DllImport(@"x64\SmartLog.dll")]
- public static extern UInt32 NT_SL_Flush();
- /*
- 万能接口, 设置参数, 大多数问题, 这些接口都能解决
- */
- [DllImport(@"x64\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetParam(UInt32 id, IntPtr pData);
- /*
- 万能接口, 得到参数, 大多数问题,这些接口都能解决
- */
- [DllImport(@"x64\SmartLog.dll")]
- public static extern UInt32 NT_SL_GetParam(UInt32 id, IntPtr pData);
- }
- public class NTSmartLog_x86
- {
- /*
- 设置日志目录,Windows平台请设置宽字符,比如"D:\\xxx\gg"
- */
- [DllImport(@"x86\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetPath([MarshalAs(UnmanagedType.LPWStr)] String path);
- /*
- 设置日志等级,level请参考SL_LOG_LEVEL
- */
- [DllImport(@"x86\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetLevel(UInt32 level);
- /*
- 将缓冲全部写入
- */
- [DllImport(@"x86\SmartLog.dll")]
- public static extern UInt32 NT_SL_Flush();
- /*
- 万能接口, 设置参数, 大多数问题, 这些接口都能解决
- */
- [DllImport(@"x86\SmartLog.dll")]
- public static extern UInt32 NT_SL_SetParam(UInt32 id, IntPtr pData);
- /*
- 万能接口, 得到参数, 大多数问题,这些接口都能解决
- */
- [DllImport(@"x86\SmartLog.dll")]
- public static extern UInt32 NT_SL_GetParam(UInt32 id, IntPtr pData);
- }
- }
|