🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5403

Re: How to call 0x21-interrupt 0x4e/0x4f (findfirst/findnext) inside a cpp-function?

#5403
From: Ed Mulroy
Date: Sat, 20 Aug 2005 12:33
29 lines
2016 bytes
The interrupts you speak of are 16 bit DOS items but C++ Builder is for 32 
bit Windows and interrupts are banned from Win32 application programs.

For a volume name try the Windows function GetVolumeInformation.

For file searching try the Windows functions FindFirstFile, FindNextFile and 
FindClose.

.  Ed

> MR wrote in message
> news:spjdg1podr0h6mokjdbb7hulhko28ch37p@4ax.com...
>
> How to call 0x21-interrupt 0x4e/0x4f (findfirst/findnext) inside a
> C(pp)-function?
>
> Being totally unexperienced in interrupt-calling, I tried it for
> myself, but run into an exception, not knowing, if this is my fault or
> if it ist just not allowed on XP.
>
> The function header I wanted to create is (analog to
> _findfirst/_findnext), but should also deliver the volume-id of
> 'filespec'.
>
> long my_findfirst( char *filespec, struct _finddata_t *fileinfo );
> int my_findnext( long handle, struct _finddata_t *fileinfo );
>
> ~~~~~
> BTW is there also another possibility to get a volume's label?
Technical Details
Message-ID: <4307238c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <spjdg1podr0h6mokjdbb7hulhko28ch37p@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,62e005f4d5ce124e
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <spjdg1podr0h6mokjdbb7hulhko28ch37p@4ax.com>
Subject: Re: How to call 0x21-interrupt 0x4e/0x4f (findfirst/findnext) inside a cpp-function?
Date: Sat, 20 Aug 2005 08:33:09 -0400
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 69.134.170.196
Message-ID: <4307238c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1124541324 69.134.170.196 (20 Aug 2005 05:35:24 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail