static bool TryLoadDLL(string dllPath) { IntPtr dllHandle = NativeMethods.LoadLibrary(dllPath); if (dllHandle != IntPtr.Zero) { //handle = new SafeDLLHandle(dllHandle, dllPath); return true; } return false; }