Re: win32.e
- Posted by David Cuny <dcuny at DSS.CA.GOV> Mar 02, 1998
- 635 views
------ =_NextPart_000_01BD45D0.294BF5C0 Content-Transfer-Encoding: quoted-printable Andy Kurnia wondered about executing functions from Win32. The file you want is WIN32.HLP. You can check: http://www.delphiexchange.com/files/document.html http://www.axi.net/dex/files/document.html Some of the functions that you want are part of the API. All of them can = be called through interrupts; here are some examples. They are not meant = to be a complete listing. Any volunteers to put these into a library? -------------------------- The DeleteFile function=20 Deletes an existing file.=20 -------------------------- BOOL DeleteFile( LPCTSTR lpFileName // address of name of file to delete =20 );=09 -------------------------- The CopyFile function=20 Copies an existing file to a new file.=20 -------------------------- BOOL CopyFile( LPCTSTR lpExistingFileName, // address of name of an existing file=20 LPCTSTR lpNewFileName, // address of filename to copy to=20 BOOL bFailIfExists // flag for operation if file exists=20 );=09 -------------------------- The MoveFile function=20 Renames an existing file or a directory=20 (including all its children).=20 -------------------------- BOOL MoveFile( LPCTSTR lpExistingFileName, // address of name of the existing file = =20 LPCTSTR lpNewFileName // address of new name for the file=20 );=09 -------------------------- Interrupt 21h Function 7139h =20 Make Directory -------------------------- mov ax, 7139h ; Make Directory mov dx, seg Name ; see below mov ds, dx mov dx, offset Name int 21h jc error =20 -------------------------- Interrupt 21h Function 713Ah =20 Remove Directory -------------------------- mov ax, 713Ah ; Remove Directory mov dx, seg Name ; see below mov ds, dx mov dx, offset Name int 21h jc error -------------------------- Interrupt 21h Function 713Bh =20 Change Directory -------------------------- mov ax, 713Bh ; Change Directory mov dx, seg Path ; see below mov ds, dx mov dx, offset Path int 21h jc error -------------------------- Interrupt 21h Function 7141h =20 Delete File -------------------------- mov ax, 7141h ; Delete File mov ch, MustMatchAttrs ; see below=20 mov cl, SearchAttrs ; see below mov dx, seg Filename ; see below mov ds, dx mov dx, offset Filename mov si, WildcardAndAttrs ; see below int 21h jc error -------------------------- Interrupt 21h Function 7147h =20 Get Current Directory -------------------------- mov ax, 7147h ; Get Current Directory mov dl, Drive ; see below mov si, seg Buffer ; see below mov ds, si mov si, offset Buffer int 21h jc error -------------------------- Interrupt 21h Function 7156h =20 Rename File -------------------------- mov ax, 7156h ; Rename File mov dx, seg OldName ; see below mov ds, dx=20 mov dx, offset OldName mov di, seg NewName ; see below mov es, di=20 mov di, offset NewName int 21h jc error =20 -------------------------- Interrupt 21h Function 716Ch =20 Create or Open File -------------------------- mov ax, 716Ch ; Create or Open File mov bx, ModeAndFlags ; see below mov cx, Attributes ; see below mov dx, Action ; see below mov si, seg Filename ; see below mov ds, si mov si, offset Filename mov di, AliasHint ; see below int 21h jc error mov [Handle], ax ; file handle mov [ActionTaken], cx ; action taken to open file =20 -- David Cuny ------ =_NextPart_000_01BD45D0.294BF5C0