Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Type Library and More

Status
Not open for further replies.

Karl Blessing

Programmer
Feb 25, 2000
2,936
US
I need to know two things

1) How do I setup the code so that the dll itself can behave as a page, rather than needing a *.asp to create an instance of it and run, because I have seen this done before, especially with CGI. This is the code I have thus far, but all it helps explain it how to obtain the ASP context from the ASP page that the ActiveX dll/ocx was created in.

Code:
Dim Request As ASPTypeLibrary.Request
Dim Response As ASPTypeLibrary.Response
Dim Server As ASPTypeLibrary.Server
Dim Session As ASPTypeLibrary.Session
Dim Application As ASPTypeLibrary.Application

Private Sub Class_Initialize()
    Dim AspSC As ASPTypeLibrary.ScriptingContext
    Set AspSC = GetObjectContext
    Set Request = AspSC.Request
    Set Response = AspSC.Response
    Set Server = AspSC.Server
    Set Session = AspSC.Session
    Set Application = AspSC.Application
End Sub

-------------------------------------------------------
The second question is a stumper for me, but how do I make it possible to return the binary data itself from an image in a picturebox even if raw bitmap, because I certainly cannot seem to figure out how to return a picturebox's image from an activeX control, to the ASP calling it so that I can do a response.binarywrite, for example I Want to do something like so in ASP calling the object asking it to return the binary data in the picturebox it generated behind the scenes.

Code:
....
   Response.ContentType = "image/bmp"
   Response.binaryWrite obj.pwImage
...

it would be nice however if I could do the above in the same manner that I wanted to do with the solution for #1 , so that I can call it direct like
and expect the return content to be treated as an image.

any help will be greatly appreciated since both topics (binary info out of a activeX, and using activeX as a page) were very very lightly documented in my search.

just a note, I understand returns from a picturebox may be very large for the internet due to it being a bitmap and all, but I intend to take this one step at a time and not worry about that just at this moment
Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
kb244,

Why not you use DHTML or IIS applications in vb6. Hard code you need in an application setting and have all of it run from that.

Aaron
 
Um what?

whats the point of that, I need something for my VB application to grab via ASP, and because the images are generated at the time of the request with latitude and longitude information, I cant hardcode a couple million posilibilities. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
I *think* that you need to create the dll as an ISAPI filter, then you can filter all the information through that DLL. I'm just guessing though, so there's a very good chance that I'm wrong...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top