Re: CCertExit and C#

From: Eduard Koller [MSFT] (eduardk_at_online.microsoft.com)
Date: 05/24/04


Date: Mon, 24 May 2004 14:13:51 -0700

Did you register your COM object using RegSvr32.exe?

-- 
Eddy Koller[MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at 
http://www.microsoft.com/info/cpyright.htm
"Gareth" <sluglit@hotmail.com> wrote in message 
news:eSA1CZWQEHA.1340@TK2MSFTNGP12.phx.gbl...
> I'm trying to port our existing CA Exit module for Microsoft CA from 
> Visual
> Basic 6 to C#.
>
> I've created an COM wrapper for certxds.dll in my project and created a C#
> class that inherits CCertExit. (See Example below)
>
> After compiling the dll, I registered it (using regsvcs and RegAsm).
>
> When I go to the certificate authority and try to add the new exit module,
> it doesn't appear in the list.
>
>
>
>
> Does anyone have any ideas...?
>
>
> Thanks
> Gareth
>
>
>
>
>
> EXAMPLE:
> internal enum ExitEvent : int
> {
>    Invalid = 0x0,
>    CertIssued = 0x1,
>    CertPending = 0x2,
>    CertDenied = 0x4,
>    CertRevoked = 0x8,
>    CertRetrievePending = 0x10,
>    CRLIssued = 0x20,
>    Shutdown = 0x40
> }
>
> [ComVisible(true), ProgId("MyNew.Exit"),
> GuidAttribute("7B4CE639-AF21-430d-AC19-929F6BAA8988")]
> public class Exit : CCertExit
> {
>    static string DESCRIPTION = "Test";
>
>    public string GetDescription()
>    {
>        return DESCRIPTION;
>    }
>
>    public Int32 Initialize(string strConfig)
>    {
>        return (Int32)(ExitEvent.CertIssued | ExitEvent.CertPending |
> ExitEvent.CertDenied | ExitEvent.CertRevoked | 
> ExitEvent.CertRetrievePending
> |         ExitEvent.Shutdown);
>    }
>
>    public void Notify(Int32 exitEvent, Int32 context)
>    {
>        //Log event to database and do other tasks
>    }
> }
>
> 


Relevant Pages

  • Re: CCertExit and C#
    ... In order for an exit module to be used by the CA, ... > I wasn't aware that you can register .NET Dll's using regsvr32. ... >>> class that inherits CCertExit. ... >>> public class Exit: CCertExit ...
    (microsoft.public.platformsdk.security)
  • How do I add an exit module to W2K CA?
    ... I then register the dll. ... the dll to show up in the 'Exit Module' tab of the CA mmc snapin app. ... No more than one Visual Basic exit module may be registered on the ... ICertExit. ...
    (microsoft.public.win2000.security)
  • Re: CCertExit and C#
    ... regasm MyExitModule.dll ... I wasn't aware that you can register .NET Dll's using regsvr32. ... >> I'm trying to port our existing CA Exit module for Microsoft CA from ...
    (microsoft.public.platformsdk.security)