public static SecurityAuditHelper.SafeLoadLibraryHandle LoadLibraryEx(string library)
            {
                SecurityAuditHelper.SafeLoadLibraryHandle handle = SecurityAuditHelper.NativeMethods.LoadLibraryExW(library, IntPtr.Zero, 0);
                int error = Marshal.GetLastWin32Error();

                if (handle.IsInvalid)
                {
                    handle.SetHandleAsInvalid();
                    throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error, System.ServiceModel.SR.GetString("SecurityAuditFailToLoadDll", new object[] { library })));
                }
                return(handle);
            }
 public static extern IntPtr GetProcAddress([In] SecurityAuditHelper.SafeLoadLibraryHandle hModule, [In, MarshalAs(UnmanagedType.LPStr)] string lpProcName);