Solved

ActiveX problem

Posted on 2007-11-26
6
276 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
Comment Utility
Anyone?
0
 
LVL 4

Author Comment

by:JeePeeTee
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

13 Experts available now in Live!

Get 1:1 Help Now