Results 1 to 7 of 7

Thread: (vbRichClient5) usable in other languages

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2016
    Posts
    10

    (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.

  2. #2
    Hyperactive Member
    Join Date
    Jul 2013
    Posts
    400

    Re: (vbRichClient5) usable in other languages

    Quote Originally Posted by oumba View Post
    @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.
    Carlos

  3. #3
    PowerPoster
    Join Date
    Sep 2012
    Posts
    2,083

    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.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,255

    Re: (vbRichClient5) usable in other languages

    Quote Originally Posted by oumba View Post
    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

    Quote Originally Posted by oumba View Post
    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2016
    Posts
    10

    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.

  6. #6
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,255

    Re: (vbRichClient5) usable in other languages

    Quote Originally Posted by oumba View Post
    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

  7. #7

    Thread Starter
    New Member
    Join Date
    Aug 2016
    Posts
    10

    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
  •  



Click Here to Expand Forum to Full Width