delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/19/15:31:36

From: Paul Shirley <Paul AT chocolat DOT obvious DOT fake DOT foobar DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: a filenames problem
Date: Sun, 19 Jul 1998 12:44:54 +0100
Organization: wot? me?
Lines: 23
Message-ID: <LyNU$RA2wds1Ewez@foobar.co.uk>
References: <01bdb100$9b7e3d60$LocalHost AT default>
<Pine DOT SUN DOT 3 DOT 91 DOT 980719123528 DOT 29744O-100000 AT is>
NNTP-Posting-Host: chocolat.foobar.co.uk
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <Pine DOT SUN DOT 3 DOT 91 DOT 980719123528 DOT 29744O-100000 AT is>, Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> writes
>> I want to develop a little program that accept parameter from command line,
>> but for be used with drag and drop of windows95;
>
>I don't think you can use drag-and-drop with DJGPP programs.

 If you drag files onto a djgpp program or shortcut to one, it will in
fact work Eli, the problem is that the program receives DOS short
filenames. (This also happens with native Win32 console apps and
probably GUI apps).

 The normal solution is to issue a findfirst() with the command line
supplied filename. The returned ffblk should contain the LFN. I've been
unable to test this under djgpp since reconfiguring with mingw32 as my
default compiler so test it first.
 In some ways this is preferable to using djgpp's LFN functions because
the same technique works in all Win32 compilers (although the
findfirst() function is different). In particular, porting to cygwin32
or mingw32 is simpler.

---
Paul Shirley: my email address is 'obvious'ly anti-spammed

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019