I try to call from Delphi the function _wputenv_s
located in ucrtbase.dll, I wrote it like this :
function _wputenv_s(varname: PChar; value_string: PChar): integer; cdecl; external 'ucrtbase.dll' delayed;
The problem I don't know if I must write cdecl or stdcall? It works well in both cases, so which one to choose?
CodePudding user response:
As a general rule, functions exported from Microsoft's CRT implementations use the cdecl
calling convention.