I was hoping someone could point me in the right direction as to
setting up a class file in my DLL. (I am using a third party toolbar
builder and I have a limited set of instructions on the DLL I can
create to extend some of the button actions.)
The 3rd party app's documentation for DLL is as follows,
"...it meets few requirements:
- It must export procedure called Main() with two parameters
- First parameter is a pointer to TPanel structure which represents
our toolbar
- Second parameter is a pointer to IWebBrowser2 representing Internet
Explorer's Web Browser
When CallDll() is executed it calls Main() procedure from DLL and
passes pointers to toolbar's TPanel structure and to Web Browser. "
I cannot seem to figure out how to get this started in C# using the
Main() with two parameters as mentioned above and was hoping I could
get some advice on starting my project.
The app provides a Delphi sample code as follows,
procedure Main(ToolbarHost: TPanel; IE: IWebBrowser2);
var First, Second: Extended;
begin
if TryStrToFloat(TEdit(ToolbarHost.FindComponent('Edi tBox1')).Text,
First)
and TryStrToFloat(TEdit(ToolbarHost.FindComponent('Edi tBox2')).Text,
Second) then
SetUrlToIE(IE.HWND, 'Result is: ' + FormatFloat('0.00', First *
Second))
else
MessageDlg('Wrong number format!', mtError, [mbOk], 0);
end;
I've tried static void Main(TPanel, IWebBrowser2){...} with no luck.
Thanks for any help anyone can provide.