Article View: comp.lang.pascal.delphi.misc
Article #291Re: Problem with Assembler in Delphi
From: Stefan Hoffmeister
Date: Sat, 16 May 1998 00:00
Date: Sat, 16 May 1998 00:00
47 lines
2184 bytes
2184 bytes
: Christophe LE CORFEC <Christophe.Lecorfec@wanadoo.fr> wrote: >I would like write a function named GetLongPathName (like the function >GetShortPathName in Win32 API). >I have found "Interrupt 21h Function 7160h Get Long Path Name" in the >API windows >So I must write it in Assembler in Delphi with the following code There is no need to use assembler here. AFAIR, what you will do is to recursively use FindFirst and FindNext to identify the long equivalent to a short name. AFAIR Ray Lischner (http://www.tempest-sw.com) has published a small routine to do this. >asm > mov ax, 7160h > mov cl, 2 ; Get Long Path Name > mov ch, SubstExpand > mov si, seg SourcePath > mov ds, si > mov si, offset SourcePath > mov di, seg DestPath > mov es, di > mov di, offset DestPath > int 21h >end; > >But the compiler refuse the lines which contain "seg". It gives me the >message : >SEG is not declared!!! > >My question is : where's the problem? You are (obviously) using a 32bit compiler. Segments are not supported in 32bit BASM. >How can I pass the segment of the variables? You don't do this. You are taking the wrong approach. -- mailto:Stefan.Hoffmeister (at) Uni-Passau.de http://kakadu.rz.uni-passau.de/~w4hoff01/ DIR: Delphi FAQs, KBs, docs PGP public key at homepage
Technical Details
Message-ID:
<355cca7a.4664095@news.rz.uni-passau.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<355BE5EA.721C4D01@wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1091e5,4ae14b9353dac8b2 X-Google-Attributes: gid1091e5,public X-Google-Thread: f894d,4ae14b9353dac8b2 X-Google-Attributes: gidf894d,public X-Google-Thread: 10baee,557e0f466030319d X-Google-Attributes: gid10baee,public From: no.spam.please@see.signature (Stefan Hoffmeister) Subject: Re: Problem with Assembler in Delphi Date: 1998/05/16 Message-ID: <355cca7a.4664095@news.rz.uni-passau.de> X-Deja-AN: 353773619 Distribution: world Content-Transfer-Encoding: 7bit References: <355BE5EA.721C4D01@wanadoo.fr> Content-Type: text/plain; charset=us-ascii Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany) Mime-Version: 1.0 Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.winapi,borland.public.delphi