1.
Run BindCOM on the file SHDOCVW.DLL located in the System32 directory on NT or the system directory on 95/98. (Make sure you download the AdaWin bindings and the BindCOM tool.)
BindCOM C:\winnt\system32\shdocvw.dll InternetExplorer
This will create a binding to the Microsoft Internet Controls type library.
2.
Paste the following code in to a file called AdaPowerBrowser.adb
with Ada.Text_IO; use Ada.Text_IO;
with InternetExplorer.IWebBrowser2_Interface;
use InternetExplorer.IWebBrowser2_Interface;
with AdaWin; use type AdaWin.VARIANT_BOOL;
with Interfaces.C; use type Interfaces.C.Int;
with AdaCOM.BSTR; use AdaCOM.BSTR;
procedure AdaPowerBrowser is
Browser : IWebBrowser2_Type;
URL : AdaWin.BSTR :=
To_BSTR(String'("http://www.adapower.com/adapower1/power.html"));
begin
Put_Line("Starting AdaPower Browser");
Create(Browser, "InternetExplorer.Application");
Put_AddressBar(Browser, 0);
Put_MenuBar(Browser, 0);
Put_StatusBar(Browser, 0);
Put_ToolBar(Browser, 0);
Put_Visible(Browser, -1);
Navigate(Browser, URL);
Free(URL);
end AdaPowerBrowser;
3.
Compile the application by typing:
gnatmake AdaPowerBrowser -I../AdaWinWhere ../AdaWin = the directory where the current version of AdaWin bindings are located.
4.
Just type AdaPowerBrowser to start up your custom InternetExplorer Application.