DelphiDabbler Code Snippets Database

Snippet Selection

The following snippets from the Code Snippets Database have been requested.

ResourceExists

Checks if a resource with name ResName and type ResType exists in the module with handle Module.

function ResourceExists(const Module: Windows.HMODULE;
  const ResName, ResType: PChar): Boolean;
begin
  Result := Windows.FindResource(Module, ResName, ResType) <> 0;
end;

ResourceExistsEx

Checks if a resource with name ResName, type ResType and language ID Language exists in the module with handle Module.

function ResourceExistsEx(const Module: Windows.HMODULE;
  const ResType, ResName: PChar; const Language: Word): Boolean;
begin
  Result := Windows.FindResourceEx(Module, ResName, ResType, Language) <> 0;
end;

View the whole database.

Go to the DelphiDabbler website.