PC Review


Reply
Thread Tools Rate Thread

Creating DLL with C# according to 3rd party specs

 
 
vikrampant@gmail.com
Guest
Posts: n/a
 
      25th Apr 2007
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('EditBox1')).Text,
First)
and TryStrToFloat(TEdit(ToolbarHost.FindComponent('EditBox2')).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.

 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      26th Apr 2007

>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.)


Does the application even support managed assemblies? In C# you can't
export static entrypoints the same way you can in C/C++ and Delphi.

Also, passing language/framework specific types such as TPanel across
module boundaries is not very cross language friendly.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3rd party addons - creating views Matt Microsoft Outlook Discussion 0 11th Jun 2008 07:21 PM
Specs for creating a background image =?Utf-8?B?Sm9hbm4gU2NobWlkdA==?= Microsoft Powerpoint 1 10th Oct 2006 09:41 AM
What's a good 3rd party tool for creating MSI installers? Peter Steele Microsoft Dot NET 0 1st Sep 2004 05:30 PM
Creating powerpoint from 3rd Party Scripting Galen Smallen Microsoft Powerpoint 1 9th Jun 2004 03:20 AM
Creating 3rd party MSI packages Chris Microsoft Windows 2000 Group Policy 1 6th May 2004 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:40 PM.