00 Votes

Lazarus: Unit SHDocVw not available

Question by Guest | 2014-08-11 at 20:17

I would like to port some lines of code from Delphi to Lazarus and at the moment, I am failing because Lazarus does not know the unit SHDocVw I need.

Specifically, it concerns the types IShellWindows, IDispatch and IWebBrowser2 that are obviously defined in that unit.

My research has shown, that there is a DLL with the same name (shdocvw.dll) in the Windows directory C:\Windows\System32. Probably, this DLL is containing my required functions.

How is it possible to make those functions available also in Lazarus?

ReplyPositiveNegative
1Best Answer1 Vote

Go to the Lazarus menu "Packages > Install/Uninstall Packages" and install the package "LazActiveX" there. 

After that, in the menu "Tools > Import Type Library", you can find a function to integrate a Windows DLL.

When using this function, Lazarus is creating an input interface unit for the DLL (for example SHDocVw_1_1_TLB). If you include this unit into your project, IShellWindows, IDispatch, IWebBrowser2 and Co should be available.
2014-08-13 at 13:23

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.