Skip to content

Commit

Permalink
Refactor CertFreeCRLContext
Browse files Browse the repository at this point in the history
  • Loading branch information
xtqqczze committed Feb 5, 2025
1 parent debf227 commit 3dd7a91
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;
using System.Runtime.InteropServices;

internal static partial class Interop
{
internal static partial class Crypt32
{
// https://learn.microsoft.com/windows/win32/api/wincrypt/nf-wincrypt-certfreecrlcontext
[LibraryImport(Libraries.Crypt32)]
public static partial int CertFreeCRLContext(IntPtr certContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,6 @@ internal static partial class Ldap
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int ldap_control_free(IntPtr control);

[LibraryImport("Crypt32.dll", EntryPoint = "CertFreeCRLContext")]
public static partial int CertFreeCRLContext(IntPtr certContext);

[LibraryImport(Libraries.Wldap32, EntryPoint = "ldap_result2error")]
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
public static partial int ldap_result2error(ConnectionHandle ldapHandle, IntPtr result, int freeIt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
<Compile Include="System\DirectoryServices\Protocols\Interop\SafeHandles.Windows.cs" />

<Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs" Link="Common\Interop\Windows\Interop.Libraries.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Crypt32\Interop.CertFreeCRLContext.cs" Link="Common\Interop\Windows\Crypt32\Interop.CertFreeCRLContext.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Wldap32\Interop.Ldap.cs" Link="Common\Interop\Windows\Wldap32\Interop.Ldap.cs" />
<Compile Include="$(CommonPath)Interop\Windows\Wldap32\Interop.Ber.cs" Link="Common\Interop\Windows\Wldap32\Interop.Ber.cs" />
</ItemGroup>
Expand Down

0 comments on commit 3dd7a91

Please sign in to comment.