Solved

ActiveX problem

Posted on 2007-11-26
6
277 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now