, ,

Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

DLL interfacing (OpenInsight 32-Bit)

At 21 AUG 2009 12:21:14AM Colin Rule wrote:

I have used DLL interfaces before without too much of an issue.

We have a requirement to interface to a DLL which was build with COM Automation Objects. This does not seem to work, as it wont recognise the import/export methods in the DLL.

Using DLL viewer or PE Explorer for example, you cannot see all the methods, despite the fact I can see them in VB.

Is there any way to link to this DLL from OI, or tricks that I dont know about.

Colin


At 21 AUG 2009 04:31AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Colin,

You can't use the traditional DLL-prototyping methods with a COM DLL - they can only be used wth C-style DLLs like the Windows API ones.

If your DLL exposes an OLE Automation interface then you can use the Basic+ OLE functions to instantiate it's classes and execute it's methods.

Did you have to register the DLL before you can use it? (You should see a DLLRegisterServer function in PE Explorer that regsvr32.exe calls if this is the case). If so then it should have written some info into the registry that the Basic+ OLE functions can use to create and manipulate it's exposed objects. You just need to find out the ProgID or GUID of the classes you want to use, and this means reading the docs or using a program like MS's OLEView to search for them.

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft


At 24 AUG 2009 01:05AM Colin Rule wrote:

You guys are starting to annoy me… sooo damn clever.

I had a look at the Registry, found the ClassId, setup the OLE links, and was able to talk to the database through the OLE/DLL and get my results, all in 20 mins.

Heres me wasting 2 days trying to get the DLL to work in other ways.

This opens up so many new possibilities.

Thanks very much.

Colin

View this thread on the Works forum...