X++:
client static int _lOpen(str fileName, int readWrite)
{
DLL _dll = new DLL("Kernel32.dll");
DLLFunction _iOpen = new DLLFunction(_dll, "_lOpen");
;
_lOpen.arg(ExtTypes::WString, ExtTypes:: DWORD);
_lOpen.returns(ExtTypes:: DWORD);
return _lOpen.call(fileName, readWrite);
}
client static int _lRead(int fHandle, Binary buff, int bytes)
{
DLL _dll = new DLL("Kernel32.dll");
DLLFunction _lRead = new DLLFunction(_dll, "_lRead");
;
_lRead.arg(ExtTypes:: DWORD, ExtTypes::Pointer, ExtTypes:: DWORD);
_lRead.returns(ExtTypes::Word);
return _lRead.call(fHandle, buff, bytes);
}
Как то так. К сожалению, проверить сейчас не могу.
С уважением, Дмитрий.