?
Solved

Response object in Visual Basic DLL running under MTS

Posted on 2001-06-07
3
Medium Priority
?
397 Views
Last Modified: 2013-11-25
Hi everyone.
I need to make a reference to response object in VB DLL running under MTS. All kind of response.write I would like to impliment in  VB DLL. Once I am done I would like to send the content of response object into the ASP page.
Any Idea.
Anu little code will be very valuable
Thank You
Nesifa
0
Comment
Question by:nesifa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:morgan_peat
ID: 6166998
The old way to do it was to have 2 routines:
OnStartPage()
OnEndPage()
in your VB class.

This has been superceeded (sp?) by the MTS object context.

Have a look at:
http://msdn.microsoft.com/library/periodic/period98/vb.htm
"Creating Internet Applications with Visual Basic"
0
 

Accepted Solution

by:
uschmitz earned 200 total points
ID: 6171389
Start by adding the following references to your Visual Basic ActiveX DLL project:

Microsoft Transaction Server Type Library (MTXAS.DLL)
Microsoft Active Server Pages Object Library (ASP.DLL)

Use the following code sample to access the ASP Response object within your component as an object variable called aspResponse:

    Dim aspResponse As ASPTypeLibrary.Response
    Set aspResponse = MTxAS.GetObjectContext.Item("Response")
    aspResponse.Write "Hello, world!"
    Set aspResponse = Nothing

Run the project. (You don't need to compile it to a DLL or register it with MTS.) Instantiate the object from VBScript using Server.CreateObject("Project.Class") and call the resulting object's method.

(Under Windows 2000 change the Reference to Microsoft Transaction Server Type Library [MTXAS.DLL] to COM+ Services Type Library [IASHLPR.DLL] and change "MTxAS" in the code sample to "COMSVCSLib".)

Note that the aspResponse object inside the Visual Basic component *IS* the ASP Response object. Using this technique delivers access to all the ASP Response object's properties and methods from within the VB component.

And you can even access all other ASP objects in exactly the same way.
0
 

Author Comment

by:nesifa
ID: 6183013
Very good answer
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question