473,472 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I make a HTTP (POST) call to DLL to make HTML?

In some applications you see a HTML page in the Web-browser call a DLL
instead of a .asp page.
The result is HTML presented in the browser.

I have seen this working for stand-alone apps as well (Internet Explorer
does the same)

== Questions
1) How does this work?
2) How do I set up the VB code inside the DLL to recieve and handle the
HTTP-call?
3) Is there any sample code available showing me the basics? (A VB project,
or "whitepapers")
4) Dou you recommend .NET or VB 6.0?

== Why?
I want create a small desktop application using HTML-pages to present data
and to present forms.
Via POST, data should be stored via the DLL into a database

== What for?
Applications to be distributed to desktops using Win 98, WinXP and Win2000

Thanks in advance.

Peter
Jul 17 '05 #1
9 6061
Cor
Hi Peter,

Peter,

This is not easy to answer, because you are asking so much and so different,
while reading it I get more and more the idea that you are mixing up things.

However, just new, this week is this link; maybe it is something for you?

http://msdn.microsoft.com/asp.net/asprk/default.aspx

Cor


Jul 17 '05 #2
> However, just new, this week is this link; maybe it is something for you?
http://msdn.microsoft.com/asp.net/asprk/default.aspx
I have to buy books anyway.
while reading it I get more and more the idea that you are mixing up things.

Reviewing things I think my question is confusing and unclear.

== VB6
4 years ago I have worked on a VB application built by someone else: saved
as EXE of DLL (i do not recall)

Instead of calling "<website>/thePage.asp?<parameters>"
the webpages called for "<website>/theDLL?<parameters>"

Then the DLL returned a HTML-page generated on the fly
IE does the same when a URL can not be resolved.

Inside the DLL there was some kind of "service" catching off the
"?<parameters>" bit.

I do not know how they did it.

== .NET
Searching the web for .NET solution I found an example using VB.NET to
present a browserwindow and catching off the "beforeNavigate2" event,
sending a "cancel=true" back and redirecting things somehow to a file
published by the VB.NET code using the ASPX "engine"

That is close, but not entirely what I have in mind.

"Cor" <no*@non.com> wrote in message
news:#C**************@tk2msftngp13.phx.gbl... Hi Peter,

Peter,

This is not easy to answer, because you are asking so much and so different, while reading it I get more and more the idea that you are mixing up things.
However, just new, this week is this link; maybe it is something for you?

http://msdn.microsoft.com/asp.net/asprk/default.aspx

Cor

Jul 17 '05 #3
== What I want to do:
1) Use HTML instead of the VB forms to present my User Interfaces inside
applications that can run on "any" desktop running Win98 and higher.
2) Run the User Interface inside a WebBrowser

== What is the best approach?
Does anyone have any experience on how to do this?
(Even parse .ASP or .ASPX scripts on clients?)

== Have I built apps with HTML frontends before?
Yes. .
I build Web-applications running on IIS to:
1) Maintain the content of databases
2) Zip and unzip large files on remote machines
3) Maintain files on remote machines
4) Publish database-content to static files.

Business logic is stored in DLLs and called via
server.CreateObject("theDLLreferrerName.ClassName" )

== Why on desktops?
HTML and DHTML offer me much more flexibility in building self-adapting user
interfaces.

A new version of a desktop app. to be developed for one of my clients will
run based on 3-tier architecture using HTML for the presentation layer, VB
for the Business Layer and MS Access for the Database Layer.
Jul 17 '05 #4
Cor
Hi Peter,

There are two possibilities; one is that they made a Com project (they did
it themselves).

However according to the date you give, I think it is not impossible the
made a VB6 IIS project (I thought the name was) it worked nice, however it
had a lot of bugs and when you did look to it, it seems to me that it could
only become buggier. Microsoft has stopped that, as far as I know had it
never updates.

Nevertheless, they came back with dotNet. In my opinion is the whole ASPNet
a much more and better implementation from that IIS solution.

It makes also DLL's (when you use visual.studio.net) but it is much more
complete, have a look at that resource kit I from which I have given you
that link
I hope this helps?

Cor
Jul 17 '05 #5
What you mean is this?

res://mshtml.dll/repost.htm

This is a resource dll. Microsoft dustributes these so that they can have
localized versions of their products
without making separate builds for each language.

In a DLL or executable you can include resources such as bitmaps, icons,
toolbars, string resources, html pages and xml forms.
This way you don't have to store the file separately with the risk of them
being deleted while there's such a high
dependency on them.

I don't know how to create one in VB since I cannot find anything that
resembles the resource in C++.
Jul 17 '05 #6
Ok, I located the VB Resource Editor Add-in. I added an html file as
resource
but I couldn't load it using the res:// prefix.
"Azeus" <azizerrafay@NOSPAM_DAMNED_hotmail.com> wrote in message
news:40*********************@news.xs4all.nl...
What you mean is this?

res://mshtml.dll/repost.htm

This is a resource dll. Microsoft dustributes these so that they can have
localized versions of their products
without making separate builds for each language.

In a DLL or executable you can include resources such as bitmaps, icons,
toolbars, string resources, html pages and xml forms.
This way you don't have to store the file separately with the risk of them
being deleted while there's such a high
dependency on them.

I don't know how to create one in VB since I cannot find anything that
resembles the resource in C++.

Jul 17 '05 #7
> It makes also DLL's (when you use visual.studio.net) but it is much more
complete, have a look at that resource kit I from which I have given you
that link
I will.

== Another way found
An intermediate solution I found presents the browser component of MS
Internet Explorer and intercepts the Navigate2 event: I did not test it on a
Desktop-machine yet.
http://www.codeproject.com/dotnet/us...asp?print=true

I do believe this is one way to go, also since it is possible to use the
functionalities of ASP.NET (in-page processing) with the speed of optimized
pardser-code.

You do not need to run it via IIS / "http:/ /<webserver>/page.aspx", which
is one target reached.

It apparently places a result-file on the Harddrive to return the result to
the browser.

== Parsing the result directly to the browser
Another way I am investigating is to somehow return parsed XML / XSL code
directly to the browser. (Another post: to some Internet Explorer
newsgroups.)
Saving it as a file seems a little bit strange to me. (But then again: if it
works, it works!)

"Cor" <no*@non.com> wrote in message
news:e2**************@tk2msftngp13.phx.gbl... Hi Peter,

There are two possibilities; one is that they made a Com project (they did
it themselves).

Jul 17 '05 #8
In article <e2**************@tk2msftngp13.phx.gbl>, no*@non.com says...

Hi Peter,

There are two possibilities; one is that they made a Com project (they did
it themselves).

However according to the date you give, I think it is not impossible the
made a VB6 IIS project (I thought the name was) it worked nice, however it
had a lot of bugs and when you did look to it, it seems to me that it could
only become buggier. Microsoft has stopped that, as far as I know had it
never updates.

Nevertheless, they came back with dotNet. In my opinion is the whole ASPNet
a much more and better implementation from that IIS solution.

It makes also DLL's (when you use visual.studio.net) but it is much more
complete, have a look at that resource kit I from which I have given you
that link
I hope this helps?

Cor


$B!!$&$&$`!#$=$&$G$9$+!#(B

Jul 17 '05 #9
dev35
1 New Member
Here is a complete and simple example easy to use

****in your vb6 class*****

Option Explicit

Dim DataConn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim Session As Session
Dim Application As Application
Dim Request As Request
Dim Response As Response
Dim Server As Server


Public Sub OnStartPage(SC As ScriptingContext)
Set Session = SC.Session
Set Application = SC.Application
Set Request = SC.Request
Set Response = SC.Response
Set Server = SC.Server
Set DataConn = Server.CreateObject("ADODB.Connection")

DataConn.Open Application("MyDataBase") ' Connection string

End Sub

Public Sub OnEndPage()
Set Session = Nothing
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
DataConn.Close
Set DataConn = Nothing
End Sub

Public Sub Execution()
'////Return somethings ...
Response.Write "<html>"
Response.Write "<body>"

Response.Write Request.ServerVariables("script_name")
Response.Write "<br>"
Response.Write Request.ServerVariables("Server_name")
Response.Write "<br>"

Set rs = DataConn.Execute("select Myfield from MyTable")
Do While Not rs.EOF
Response.Write rs("Myfield") & "<br>" & vbCrLf
rs.MoveNext
Loop
rs.Close
Set rs = Nothing

Response.Write "</body>"
Response.Write "</html>"

End Sub

****in your asp page*****
<%
Set Page = Server.CreateObject("MyProject.MyClass")
Page.Execution()
set Page = nothing
%>

**** That's it*****
Hope this helps
Jul 26 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Erik Johnson | last post by:
Hi, I am trying to spawn a daemon type program to go off on its own and do some work (asynchoronously) from within an HTTPServer, but I am running into a problem where the web browser (actually...
17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
6
by: Phillip N Rounds | last post by:
I have a webform, from which I have to submit info to another site. Their instructions are to have a html form, with the following as the submit: <form method="post"...
1
by: Lewis | last post by:
Hi, Im having a problem with an aspx page that I'm building (and rather urgently needing to complete!). Situation is this... Im transforming some XML using an XSLT which builds an HTML form...
4
by: Ben | last post by:
Hi, I have several forms that need to post data to a remote site and currently they just do a POST action with the data. I am trying to centralise the code which manages the parameters for easier...
4
by: Peter Kaptein | last post by:
In some applications you see a HTML page in the Web-browser call a DLL instead of a .asp page. The result is HTML presented in the browser. I have seen this working for stand-alone apps as well...
3
by: computer_guy | last post by:
Hi Everyone, I run into a problem. I am trying to write an aspx that can dynamically generate an image based on some input parameters. Things are very simple if the size of the parameters is...
2
by: Nick Chan | last post by:
hello, i have this summarized stored proc. Problem is, when using 'Send', my aspx page reads (asp.net)Request.Form as empty However, when I use a simple html file to post, it works. Does anyone...
1
by: John Straumann | last post by:
Hello all: I am trying to call an ASPX page from another ASPX page code-behind file by using the HTTP Request object. By loading the page and typing: javascript:alert(resultRender.outerHTML) ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.