Написал следущую обёртку для функции getFullPathName:
X++:
client static Filename getFullPathName(Filename _filename)
{
DLL _winApiDLL = new DLL(#KernelDLL);
DLLFunction _getFullPathName = new DLLFunction(_winApiDLL, 'GetFullPathNameW');
Binary bufer = new Binary(#MAX_PATH);
;
_getFullPathName.returns(ExtTypes::DWord);
_getFullPathName.arg(ExtTypes::WString,
ExtTypes::Pointer,
ExtTypes::WString,
ExtTypes::WString);
if(_getFullPathName.call(_filename, #MAX_PATH*2, bufer, null))
{
_getFullPathName.call(_filename, #MAX_PATH*2, bufer, null);
return bufer.wString(0);
}
return '';
}
вызываю в Job - е:
X++:
static void WinAPIgetFullPathName(Args _args)
{
Filename filename;
;
filename = winAPI::getFullPathName("myfile.txt");
info(strfmt("%1", filename));
}
Ничего не возвращает, подскажите если можете в чём ошибка