Board index » delphi » Long file names, how to retrieve - help, please

Long file names, how to retrieve - help, please

Hi all !

        I have a question: is it possible to retrieve the Windows'95 (WIN32) long
file names from WIN16 program ?
If it is possible, tell me please, how to do it. I know something about
"thunking" technique (the ability of calling Win32 functions from Win16
applications). Can you send me a sample Win16 program (C or Pascal).

Thanks in advance

Alex

 

Re:Long file names, how to retrieve - help, please


Alex Igumnov <alex_igum...@mail.convey.ru> schreef in artikel
<01bca10f$f5b51d00$LocalHost@alex-igumnov>...

Quote
> Hi all !

>    I have a question: is it possible to retrieve the Windows'95 (WIN32)
long
> file names from WIN16 program ?

Yes, it is possible! But only if your Win16 program is running under
Windows 95 in a DOS box; not outside Windows 95 (in MS-DOS mode). Or if it
is a plain 16-bit Windows application. Also, it works only on Windows 95,
not on NT.

Quote
> If it is possible, tell me please, how to do it. I know something about
> "thunking" technique (the ability of calling Win32 functions from Win16
> applications). Can you send me a sample Win16 program (C or Pascal).

Fortunately, you don't need to do difficult thunking things. There are a
number of interrupt functions you can call. These are documented in the
Win32 SDK documentation. I'm using Visual C++ 5.0 and found the information
under this node in InfoView:

Platform, SDK, and DDK Documentation
    Platform SDK
        Windows Base Services
            Windows 95 Features
                Using Windows 95 Features
                    Long Filenames

It describes which functions are available and provides some examples to
call them. For example, Interrupt 21h Function 7160h Minor Code 0h
corresponds to the Windows function GetFullPathName().

If you want, I can e-mail you a small C program I wrote once to check this
out. (I'll have to search for it first, haven't got it right here).

Quote
> Thanks in advance
> Alex

Regards,
Jesper de Jong

jesper (at) xs4all.nl
NOTE: The reply-address of this message is not my e-mail address!

Re:Long file names, how to retrieve - help, please


In article <01bca10f$f5b51d00$LocalHost@alex-igumnov>, "Alex Igumnov"

Quote
<alex_igum...@mail.convey.ru> wrote:
>Hi all !

>        I have a question: is it possible to retrieve the Windows'95
(WIN32) long
>file names from WIN16 program ?

yes it is indeed possible to do this.

Quote
>If it is possible, tell me please, how to do it. I know something about
>"thunking" technique (the ability of calling Win32 functions from Win16
>applications). Can you send me a sample Win16 program (C or Pascal).

OTOH i have no idea how to do it though.

perhaps ifshlp.sys installs a call you could make to get the LFN.

Bevyn.

--
disclaimer

not only did i not post this i have never seen any of these letters before in my life.

Guaranteed silly posts or my money back!!!

Other Threads