Find more
Windows programming tools at
 
   
  EzTools Software Logo Quality Windows Programming Tools
Because Presentation is Everything
WOW.NET
.NET WebBrowser wrapper
for window.external handling
more info
 
Home  Downloads  Buy Support Services About Us

WOW and HSP object injection 

 

Product Quicklist  
  Database Products
SQLitePlus & SQLite++  
SQLite.NET DLL  
SqlWeb COM DLL  
  HSP System
Overview  
HTML Scripting Pages  
EzWeb Compiler  
EzReg Copy Protection  
  ActiveX & .NET Components
EditListView Enhanced ListView  
WOW WebBrowser  
WOW.NET Component  
WOW and HSP  
HSP Object Injection  
Custom External Object  
Tutorial  
BrowserList HTML Listbox  
HotButton ActiveX  
HotLink HTML HyperLink  
HotList HTML Listbox  
SuperCombo HTML Droplist  
TabStrip ActiveX  
  Other Products
RegDb COM DLL  
Zip COM DLL  
Source Code  
EzComm Messaging DLL  
ActiveScript.NET  

 

Download  (EzToolsLib)

We have already discussed how WOW and HSP can work together in your Windows programs.  Now lets take it a step further.  You can actually inject a COM object into the HSP programming scope, such that you can use it in the VBScript/JScript code during the processing of your ASP page.  And amazingly, you can do the same thing with .NET classes! The COM Interop service will transparently create the COM interface for you.

You can do this by using the HSP Server Object in your Application code to "inject" an object into the Server.SessionVar collection where it can be used by the ASP code.  This collection is "static", meaning that it exists for the lifetime of your application.  It allows you to provide your own COM object (must be scriptable) or .NET class, either created by you (such as a VB Class or Form object) or an existing COM object (such as an ADO Connection or Recordset).

Here is an example of how to inject an ADO Connection object. Suppose you have a global ADO Connection object in your application, and you want to use this same object in your ASP pages rather than create a new. This code would go in your VB project code:

Dim hspServer as new HSP.Server

'g_dbConn was created in your App's startup code
set hspServer.SessionVar("dbconn") = g_dbConn


Now you can access the Connection object in the ASP code

<%
Dim cnn

Set cnn = Server("dbconn")

cnn.Open "...
%>

Now lets take a .NET example.

m_hsp = New HSP.Server()

m_hsp.SessionVar("MyObj") = New MyDotNetClass()

Now you can access the .NET class object in the ASP code just like any COM object:

<%
Dim myObj

Set myObj= Server("MyObj")

myObj.DoSomething
%>


 

Copyright © EzTools Software2001-2007 All rights reserved. Trademarks and Disclaimer:
All trademarks belong to their respective companies.