Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-03-25 10:10:21


bjorn.karlsson_at_[hidden] wrote:
> > From: Vladimir Prus [mailto:ghost_at_[hidden]]
> >
> > Does anyone knows a Windows API function which can return
> > long path given a
> > short one? I've tried to look, but found none.
>
> There's an API function called GetLongPathName - but it isn't available for
> NT (or Windows 95, but that's hardly an issue).

Thanks.

Hmm... I'm not sure if NT is an issue, either. Since we're workarounding test
system problem, we care only for system where Boost.Build tests will be run.
We can apply workaround only for systems where the function is defined,
provided we can tolerate that tests will only pass on such systems.

Ok, trying to look up this function on msdn.com reveals the following comment:

Windows NT and Windows 95: Include an additional header file called
NewAPIs.h to make GetLongPathName available on these operating systems.
The function is not implemented natively, but by a wrapper that utilizes
other native functions on these systems. See the header file for details
of the use of preprocessor directives that make the function available.
If you do not have this header file, it can be obtained by downloading
the most recent SDK from the SDK Update Site.

Hell.. this all is complex!

> I think you'll have to roll
> your own in order to get it to work on all Windows versions. A quick
> Google-search came up with a possible hack -
> http://www.geocities.com/SiliconValley/2060/articles/longpaths.html.

Thanks for poiting this out. Unfortunately, it uses <algorithm> :-(

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk