Skip to content

Commit

Permalink
build: Call SetDllDirectory system API to help finding provided DLL l…
Browse files Browse the repository at this point in the history
…ibraries on windows
  • Loading branch information
g-bougard committed May 17, 2024
1 parent a7c8fd2 commit 26530f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ Revision history for GLPI agent

1.9 not yet released

packaging:
* Fix: Call SetDllDirectory system API to help finding provided DLL libraries on windows

1.8 Wed, 15 May 2024

core:
Expand Down
7 changes: 7 additions & 0 deletions contrib/windows/packaging/setup.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use parent qw(Exporter);

use File::Spec;
use Cwd qw(abs_path);
use Win32::API;

our @EXPORT = ('%setup');

Expand All @@ -20,4 +21,10 @@ our %setup = (
libdir => $basefolder.'/perl/agent',
);

my $apiSetDllDirectory = Win32::API->new(
'kernel32',
'BOOL SetDllDirectoryA(LPCSTR lpPathName)'
);
$apiSetDllDirectory->Call($basefolder.'/perl/bin');

1;

0 comments on commit 26530f7

Please sign in to comment.