DelphiFAQ Home Search:
General :: Programming :: Delphi :: .NET
Starting in .NET or already familiar but having a question? You might find it answered here!


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

hInstance is no longer defined in Delphi 8 .NET


It seems that the global variable hInstance is no longer defined in .NET. How do I obtain the instance handle now?


HInstance provides a unique instance handle for the application or library. It indicates the handle for a module.
You need to add unit WINUTILS to your uses clause to make the following code work:

h := SysInit.hInstance; // Delphi 2-7
uses WinUtils; .. h := Borland.Vcl.WinUtils.hInstance(); // Delphi 8

Generated 8:01:32 on Mar 19, 2018