Solved

ActiveX problem

Posted on 2007-11-26
6
278 Views
Last Modified: 2010-04-05
Hi all,

I've posted a question about this subject some weeks ago.
See: http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_22949796.html

I need to write a plug-in DLL for a software package. The company of this software package provided a code sample in Visual Basic how to work this out. Unfortunately I'm using Delphi and need to translate this to implement it in my project.

As it seems, the DLL is an ActiveX library that has got some Ole Automation objects in it. I've extracted the type library from the sample (VB) DLL and created a new Delphi project and my own Ole Automation objects based on the specifications in the sample VB type library.

So far so good.

When I start the software package my DLL is loaded, because I specified the Host Application as parameter in the Delphi IDE and it goes through the Initialization section of my code asuming my Ole objects are created. The DLL is also locked by Windows as long as the software package is loaded. However, the interface doesn't seem to work. I quite can't figure out what I'm doing wrong here.

I've opened a FTP account in which I have put some files.

VB_BPWindow ---- plug-in sample in VB code provided by the manufacturer of the software package.
Delphi_BPWindow --- My translation project so far in Delphi.
TypeLibsAndDLLs --- Resulting DLLs and Type libraries from the VB sample code and my Delphi project.

FTP login:

Server: ftp.systony.nl
User ID: DelphiCoder
Password: WU&5BsJZ

I've put 500 points on it.

Thanks in advance,

JeePeeTee


Open in new window

0
Comment
Question by:JeePeeTee
  • 3
6 Comments
 
LVL 4

Author Comment

by:JeePeeTee
ID: 20359874
Anyone?
0
 
LVL 4

Author Comment

by:JeePeeTee
ID: 20387679
Ok, no Expert comments yet.

I've figured something out and made some progress on it. The type libraries are now exactly the same in my project as it is in the VB sample DLL. It's still not working though. When I compare the two DLLs (the VB Sample DLL and my Delphi DLL) in a resource editor, and I see some differences that might cause the troubles.

See the screenshot below:
http://www.danceboost.com/vbvsdelphidll.jpg

How can I publish my classes the same way they did in my DLL?

Thanks,

JeePeeTee
0
 
LVL 4

Author Comment

by:JeePeeTee
ID: 20403290
Any experts who have any idea at all? I'm really stuck with this.
0
 
LVL 5

Accepted Solution

by:
Steven-Fernandez earned 500 total points
ID: 20762193
Are you about to call any functions from your DLL?

Also there's an issue that Delphi programmers seem to forget. Remember you use all parameters when calling the functions from the DLL in delphi.

VB will let you get away with leaving parameters out but delphi will not.

 

0
 
LVL 1

Expert Comment

by:Computer101
ID: 21216626
Forced accept.

Computer101
EE Admin
0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question