Skip to content

Commit 88778db

Browse files
committed
Refine fix pyscripter#289
1 parent 07f73c4 commit 88778db

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Source/PythonEngine.pas

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2923,9 +2923,12 @@ procedure TDynamicDll.DoOpenDll(const aDllName : string);
29232923
{$IFDEF MSWINDOWS}
29242924
ExceptMask := GetExceptionMask;
29252925
try
2926-
FDLLHandle := LoadLibraryExA(
2927-
PAnsiChar(AnsiString(GetDllPath+DllName)), 0,
2928-
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR or LOAD_LIBRARY_DEFAULT_DIRS);
2926+
{$IFDEF FPC}
2927+
FDLLHandle := LoadLibraryExA(PAnsiChar(AnsiString(GetDllPath+DllName)),
2928+
{$ELSE}
2929+
FDLLHandle := LoadLibraryEx(PWideChar(GetDllPath+DllName),
2930+
{$ENDIF}
2931+
0, LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR or LOAD_LIBRARY_DEFAULT_DIRS);
29292932
finally
29302933
SetExceptionMask(ExceptMask);
29312934
end;

0 commit comments

Comments
 (0)