Article View: borland.public.cppbuilder.nativeapi
Article #13467Short/Long pathname
From: dude
Date: Thu, 09 Oct 2003 20:21
Date: Thu, 09 Oct 2003 20:21
20 lines
1620 bytes
1620 bytes
Hello, I am trying to convert a long path name to a short one. Here is an example: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> LPCTSTR lspFilename; LPTSTR spFilename; unsigned long buffer; ::GetShortPathName(lspFilename,spFilename,buffer); ::ShellExecute(NULL , "open", "EXCEL.EXE", spFilename, 0, SW_SHOW); >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> The problem is the spFilename will come back null or with junk characters. What am I doing wrong? This is to convert for the shellexecute command because that will bomb as well, given a long file name. Help! Thanks in advance
Technical Details
Message-ID:
<3f85c1b4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!newspeer.radix.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d208aa5f5b67a796,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-10-09 13:29:57 PST From: "dude" <bendixdude@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Short/Long pathname Date: Thu, 9 Oct 2003 16:21:52 -0400 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 12.46.189.1 Message-ID: <3f85c1b4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1065730484 12.46.189.1 (9 Oct 2003 13:14:44 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!newspeer.radix.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail