PC Review


Reply
Thread Tools Rate Thread

Delphi DLL vs Dot Net DLL

 
 
DanB
Guest
Posts: n/a
 
      3rd Aug 2004
I need to write a DLL that has a function in it named "AfterSession". (A
commercial packages calls this DLL and fills a Structured Type with data.)

The example the company shows is written in Delphi. The syntax of Delphi
has you identify the procedures etc that are to be exported in the EXPORT
section of your program. The resultant DLL when built has entry points
defined with offsets etc. One of those entry points is "AfterSession"

I am trying to write a VB Dot Net DLL to do the same thing. I started with
a component class and added:
Public Function AfterSession() etc.
I put this in the only class in the program.

When I build the DLL it does not work. When comparing the two DLL's I see
that mine does not have any Entry Points defined, so I think somehow I need
to get this to occur.

BTW If I use my DLL as a reference within another VB.NET application it runs
as expected.

Any ideas?


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      3rd Aug 2004
* "DanB" <(E-Mail Removed)> scripsit:
> I need to write a DLL that has a function in it named "AfterSession". (A
> commercial packages calls this DLL and fills a Structured Type with data.)
>
> The example the company shows is written in Delphi. The syntax of Delphi
> has you identify the procedures etc that are to be exported in the EXPORT
> section of your program. The resultant DLL when built has entry points
> defined with offsets etc. One of those entry points is "AfterSession"


This cannot be done in VB.NET/C#.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
BriamDH
Guest
Posts: n/a
 
      3rd Aug 2004
How about if I create an ASPX page that calls the web service.
Then useing "DataSet.GetXML" Write the return value to the HTML part of the
ASPX page as an Data Island. Then within my ASP page call the ASPX page via
IFrame to access the data island.

Right now I am parsing a DI with my VB Script from an IFrame ASP page.

Maybe? anyone?

B

B
"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> * "DanB" <(E-Mail Removed)> scripsit:
> > I need to write a DLL that has a function in it named "AfterSession".

(A
> > commercial packages calls this DLL and fills a Structured Type with

data.)
> >
> > The example the company shows is written in Delphi. The syntax of

Delphi
> > has you identify the procedures etc that are to be exported in the

EXPORT
> > section of your program. The resultant DLL when built has entry points
> > defined with offsets etc. One of those entry points is "AfterSession"

>
> This cannot be done in VB.NET/C#.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>




 
Reply With Quote
 
David Williams , VB.NET MVP
Guest
Posts: n/a
 
      4th Aug 2004
It sounds like the Delphi DLL that you are creating is using COM to
communicate. If this is so, then you can accomplish the same
functionality via COM Interop. To do so, you need to mark the
"AfterSession" function with the <COMAccessible> attribute.

HTH

David

"DanB" <(E-Mail Removed)> wrote in message
news:#q#(E-Mail Removed):
> I need to write a DLL that has a function in it named "AfterSession".
> (A
> commercial packages calls this DLL and fills a Structured Type with
> data.)
>
> The example the company shows is written in Delphi. The syntax of
> Delphi
> has you identify the procedures etc that are to be exported in the
> EXPORT
> section of your program. The resultant DLL when built has entry points
> defined with offsets etc. One of those entry points is "AfterSession"
>
> I am trying to write a VB Dot Net DLL to do the same thing. I started
> with
> a component class and added:
> Public Function AfterSession() etc.
> I put this in the only class in the program.
>
> When I build the DLL it does not work. When comparing the two DLL's I
> see
> that mine does not have any Entry Points defined, so I think somehow I
> need
> to get this to occur.
>
> BTW If I use my DLL as a reference within another VB.NET application it
> runs
> as expected.
>
> Any ideas?


 
Reply With Quote
 
Dan Bacon
Guest
Posts: n/a
 
      4th Aug 2004
Thanks , I'll try that.
Dan

"David Williams , VB.NET MVP" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> It sounds like the Delphi DLL that you are creating is using COM to
> communicate. If this is so, then you can accomplish the same
> functionality via COM Interop. To do so, you need to mark the
> "AfterSession" function with the <COMAccessible> attribute.
>
> HTH
>
> David
>
> "DanB" <(E-Mail Removed)> wrote in message
> news:#q#(E-Mail Removed):
> > I need to write a DLL that has a function in it named "AfterSession".
> > (A
> > commercial packages calls this DLL and fills a Structured Type with
> > data.)
> >
> > The example the company shows is written in Delphi. The syntax of
> > Delphi
> > has you identify the procedures etc that are to be exported in the
> > EXPORT
> > section of your program. The resultant DLL when built has entry points
> > defined with offsets etc. One of those entry points is "AfterSession"
> >
> > I am trying to write a VB Dot Net DLL to do the same thing. I started
> > with
> > a component class and added:
> > Public Function AfterSession() etc.
> > I put this in the only class in the program.
> >
> > When I build the DLL it does not work. When comparing the two DLL's I
> > see
> > that mine does not have any Entry Points defined, so I think somehow I
> > need
> > to get this to occur.
> >
> > BTW If I use my DLL as a reference within another VB.NET application it
> > runs
> > as expected.
> >
> > Any ideas?

>



 
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
From Delphi to VB Henry Microsoft VB .NET 3 14th Jun 2006 08:05 PM
Delphi 7 did it to me! :( GregBerg Microsoft Access External Data 0 9th Apr 2004 08:57 AM
VB or Delphi Me Microsoft Access 2 28th Feb 2004 11:41 PM
Using .NET dll in Delphi Tim Bird Microsoft Dot NET Framework 3 11th Feb 2004 02:03 PM
Delphi BS Windows XP Internet Explorer 10 10th Dec 2003 05:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 PM.