-
Jan 13th, 2018, 03:12 AM
#1
Thread Starter
New Member
(vbRichClient5) usable in other languages
@Olaf,
is it possible to use vbRichClient.dll via its type library in Delphi or Lazarus (Late-Binding is no problem)? Unfortunately oleview.exe can't read the complete type library either. It reports errors with CoClasses: cPart, cMMDeviceEnumerator, cDownload.
Thank you very much in advance and I hope for a positive answer
Norbert.
-
Jan 13th, 2018, 08:28 AM
#2
Hyperactive Member
Re: (vbRichClient5) usable in other languages
Originally Posted by oumba
@Olaf,
is it possible to use vbRichClient.dll via its type library in Delphi or Lazarus (Late-Binding is no problem)? Unfortunately oleview.exe can't read the complete type library either. It reports errors with CoClasses: cPart, cMMDeviceEnumerator, cDownload.
Thank you very much in advance and I hope for a positive answer
Norbert.
I am sure it is possible. I use it with Visual Objects almost perfectly, both early and late binding.
-
Jan 13th, 2018, 08:56 AM
#3
Re: (vbRichClient5) usable in other languages
RC5 certainly can be used for Dephi, VC++, .NET and any other programming languages that can invoke COM components. I guess it can also be used in Python and Java (through some helper tools). Don't know if it is available for GoLang.
-
Jan 13th, 2018, 10:33 AM
#4
Re: (vbRichClient5) usable in other languages
Originally Posted by oumba
is it possible to use vbRichClient.dll via its type library in Delphi or Lazarus (Late-Binding is no problem)?
Sure - it's normal COM-interfaces (and as all VB6-Dll-Classes, they are compiled and exported, deriving from IDispatch, not directly from IUnknown).
FWIW, here is a plain vbRichClient5.tlb which I've just build: vbRichClient5_TypeLib.zip
Originally Posted by oumba
Unfortunately oleview.exe can't read the complete type library either. It reports errors with CoClasses: cPart, cMMDeviceEnumerator, cDownload.
Yep, OleView.exe is a bit "over-eager" whilst trying to render the contained CoClasses (and their implemented Interfaces),
because it tries to show not only the default-(disp)interfaces, but also the additionally implemented Interfaces of a CoClass
(and when these additionally implemented Interfaces of a VB-Class come from Dll-Project internally defined TypeLibs, OleView will choke - unless that TypeLib is registered on the system as well).
But that is (import-wise) nothing to worry about, because what you will need from e.g.:
- cPart (which internally implements also IControlChangeNotify, for strictly "private usage")
- is only its "true COM-interface" - which you can find in OleView as _cPart under [Interfaces]
- and (if you need it at all), the Event-Dispatch-Interface - which you will find as __cPart under [DispInterfaces]
If some Lazarus- or Delphi-ImportTool restricts itself, to only import the default-interfaces from a CoClass - then you should not have any problem...
HTH
Olaf
-
Jan 13th, 2018, 03:39 PM
#5
Thread Starter
New Member
Re: (vbRichClient5) usable in other languages
Thank you Olaf for your efforts, which unfortunately do not lead to success. The Type Lib is already registered and works well in VB6 and VBA. But even if the Type Library was not registered, it would be imported by Delphi.
Would it be possible for someone to provide me with the IDL source code so that I can compile the Typelib myself?
Norbert.
-
Jan 13th, 2018, 08:27 PM
#6
Re: (vbRichClient5) usable in other languages
Originally Posted by oumba
Would it be possible for someone to provide me with the IDL source code so that I can compile the Typelib myself?
Ok, here you go: vbRichClient5_IDL.zip
It's an export from OleView (followed by some cleanup about the internally used TypeLibs of the RC5, which you do not need for early-binding).
HTH
Olaf
-
Jan 14th, 2018, 10:07 AM
#7
Thread Starter
New Member
Re: (vbRichClient5) usable in other languages
Thank you, Olaf. After some back-and-forth I managed to create a working Pascal Unit for Delphi.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|