Karl Blessing
Programmer
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.
-------------------------------------------------------
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.
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}
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}