Re: can i load my own dll's into services.exe, if how

From: John Spaith [MS] (jspaith_at_ONLINE.microsoft.com)
Date: 12/06/04


Date: Mon, 6 Dec 2004 12:23:33 -0800

If the MSDN docs don't make sense about ISAPI extensions/ISAPI filters, look
on Internet for some other material someone else has written. I don't think
I can explain it better than MSDN does, so maybe some 3rd party will.

Steve is correct about ASP pages. You have to write an ActiveX object that
ASP pages can call through to access them.

As far as having DLL's have multiple instances loaded up at the same time,
you can solve this by having your DLL be loaded up as a service in
services.exe on system init (rather than in another process). This DLL will
export the required functions to be loaded in Services.exe (xxx_Init,
xxx_IOControl, etc... see services.exe docs) AND ActiveX stuff for ASP to
call into you. Since the DLL is loaded up in the same process, you'll only
have one copy of the instance variables. If you do this, just be very
careful on ref-counting since if you unload the service the DLL may not be
unloaded since ASP would still have an open reference to the DLL. COM waits
about 10 minutes (or more) before unloading ActiveX objects even once their
ref count goes to 0.

If this doesn't work, then a file mapping or internal message queues (not
MSMQ - see CreateMsgQueue() for internal message queues) may work for inter
process communications for you.

-- 
John Spaith
Software Design Engineer, Windows CE
Microsoft Corporation
Check out the new CE Networking Team Blog at http://blogs.msdn.com/cenet/.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2003 Microsoft Corporation. All rights 
reserved.
"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message 
news:uA0D%23L82EHA.2592@TK2MSFTNGP09.phx.gbl...
> ASP pages cannot access random DLLs they can ONLY use COM components and 
> script code. You can access ANY DLL from an ISAPI extension (ASP is itself 
> an ISAPI extension- think of  ISAPI as a kind of Plug-in for the Web 
> server)
>
> -- 
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
> 


Relevant Pages

  • Re: can i load my own dlls into services.exe, if how
    ... ISAPI extensions and ISAPI filters can be useful. ... > DLL via JScript 'new ActiveXObject' or the VBscript equivalent in your ASP ...
    (microsoft.public.windowsce.app.development)
  • ASP / ASP.NET
    ... Ich habe folgendes Vorgehen mit ASP erfolgreich getestet: ... Eine Active-X DLL übernimmt die Abfrage der ... (hat nichts mit dem Request aus ASP zu tun). ... es ist effizient und recht schnell weil die Abfrage der Datenbank ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Re: Registering a .NET assembly for COM interop access from an ASP page
    ... If I put my DLL in ... problems with ASP pages calling a strongly named assembly, ... Pointer to a null-terminated string that specifies the full path to ... So the IIS process or dllhost will check the lpCurrentDirectory in their ...
    (microsoft.public.dotnet.framework.interop)
  • Re: returning multiple recordsets from VB to ASP
    ... stored procedure and into an intermediate VB DLL: ... more awkward to do in SQL than in VB and the stored procedure is getting ... The ASP page anways puts the data into arrays, ...
    (microsoft.public.data.ado)
  • Re: isapi filter/etension
    ... like ASP, to execute. ... [Use your DLL to process the original file and dump output to a temporary ... ISAPI Filter which intercepts the ... SF_NOTIFY_URL_MAP event and maps pszPhysicalPath to the temporary filename ...
    (microsoft.public.inetserver.iis)