title: Loading DLL via GetModuleHandle/LoadLibrary and using FreeLibrary
body: <p>here is my code:</p>
  
  <pre><code>function GetProcedureAddress(var P: FARPROC; const ModuleName, ProcName: AnsiString): Boolean;
  var
    ModuleHandle: HMODULE;
  begin
    Result := False;
    ModuleHandle := GetModuleHandle(PAnsiChar(AnsiString(ModuleName)));
    if ModuleHandle = 0 then
      ModuleHandle := LoadLibrary(PAnsiChar(ModuleName)); // DO WE NEED TO CALL  FreeLibrary ?
    if ModuleHandle &lt;&gt; 0 then
    begin
      P := Pointer(GetProcAddress(ModuleHandle, PAnsiChar(ProcName)));
      if Assigned(P) then
        Result := True;
    end;
  end;
  
  function PathMakeSystemFolder(Path: AnsiString): Boolean;
  var
    _PathMakeSystemFolderA: function(pszPath: PAnsiChar): BOOL; stdcall;
  begin
    Result := False;
    if GetProcedureAddress(@_PathMakeSystemFolderA, 'shlwapi.dll', 'PathMakeSystemFolderA') then
      Result := _PathMakeSystemFolderA(PChar(Path));
  end;
  </code></pre>
  
  <p>DO we need to call FreeLibrary if using LoadLibrary? or it's reference count will decremented automatically when my application terminates?</p>