private Difx() { _mLogCallback = new DIFLOGCALLBACK(Logger); Log.Debug("Preparing to load DIFxAPI"); if (Environment.Is64BitProcess) { Log.InfoFormat("Running as 64-Bit process"); var libwdi64 = Path.Combine(WorkingDirectory, @"DIFxApi\amd64\DIFxAPI.dll"); Log.DebugFormat("DIFxAPI path: {0}", libwdi64); LoadLibrary(libwdi64); Log.DebugFormat("Loaded library: {0}", libwdi64); } else { Log.InfoFormat("Running as 32-Bit process"); var libwdi32 = Path.Combine(WorkingDirectory, @"DIFxApi\x86\DIFxAPI.dll"); Log.DebugFormat("DIFxAPI path: {0}", libwdi32); LoadLibrary(libwdi32); Log.DebugFormat("Loaded library: {0}", libwdi32); } SetDifxLogCallback(_mLogCallback, IntPtr.Zero); }
/// <summary> /// Automatically loads the correct native library. /// </summary> private Difx() { LoadNativeLibrary("DIFxAPI", @"DIFxApi\x86\DIFxAPI.dll", @"DIFxApi\amd64\DIFxAPI.dll"); _mLogCallback = Logger; SetDifxLogCallback(_mLogCallback, IntPtr.Zero); }
protected Difx() { m_LogCallback = new DIFLOGCALLBACK(Logger); }
public static extern void SetDifxLogCallback(DIFLOGCALLBACK LogCallback, IntPtr CallbackContext);
public Difx(DIFLOGCALLBACK logCallback) { SetDifxLogCallback(logCallback, IntPtr.Zero); }
private static extern void SetDifxLogCallback(DIFLOGCALLBACK logCallback, IntPtr callbackContext);