Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: Could not load SSL library
#4
(05-09-2018, 02:10 PM)RaelB Wrote: Can it not be in the same directory as the main exe with other files?

As long as you make sure that this is a guarantied permanent directory, e.g. you must enter is as an absolute path.
I always generate a subdirectory in AppData for my applications, and there keep all my internal application stuff.
Code:
procedure GetDataDirectory;
var
 Buffer: array [0..255] of Char;
begin
 FillChar(Buffer, 256, #0);
 try
   if SHGetFolderPath(Application.Handle, CSIDL_APPDATA, 0, 0, Buffer) = S_OK then
   begin
     DataPath := IncludeTrailingPathDelimiter(StrPas(Buffer));
     DataDir := IncludeTrailingPathDelimiter(DataPath + MyProgramName);
     if not DirectoryExists(DataDir) then ForceDirectories(DataDir);
     SSLDir := IncludeTrailingPathDelimiter(DataDir + 'SSL');
     if not DirectoryExists(SSLDir) then ForceDirectories(SSLDir);
 except
 //
 end;
end;

Nice and clean.
Above also still works under Windows XP.
---
Bart Kindt
CEO and Developer
SARTrack Limited
New Zealand
www.sartrack.nz
Reply


Messages In This Thread
Error: Could not load SSL library - by RaelB - 05-09-2018, 08:49 AM
RE: Error: Could not load SSL library - by RaelB - 05-09-2018, 02:10 PM
RE: Error: Could not load SSL library - by BartKindt - 05-09-2018, 03:06 PM
RE: Error: Could not load SSL library - by RaelB - 05-09-2018, 03:19 PM
RE: Error: Could not load SSL library - by RaelB - 05-09-2018, 06:36 PM
RE: Error: Could not load SSL library - by RaelB - 05-12-2018, 06:44 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)