Re: Vista and reading/writing files



On Jan 30, 2:48 pm, "James Parsly" <japar...@xxxxxxxxxxxxxx> wrote:
Under Vista, there's some pressure to make you conform to certain
'standard' locations for executables, common files, and user files.

In VB6 I can get the appropriate folder names using an API call to
SHGetFolderPath. Not sure how I'd do this in Fortran, since it
requires a windows handle as one of the arguments.

What's a good way to handle getting these directory names?

Most commercial Windows-based compilers have Windows API interfaces
(at least partial) supplied as modules. Look for the API you need/
want the first. If that is unsuccessful, look at similar APIs
interface descriptions in the associated Fortran module source file
and write the interface manually.

As other regulars here note, this is inherently platform-dependent and
non-standard, so the key to any future portability is segregation and
modularization of the code to isolate such system-dependencies as well
as possible, then document where they are.

.



Relevant Pages

  • Re: newbe about API
    ... Emne: Re: newbe about API ... > I found all these API-CALL strings are finally compiled to ... more than that...and Windows simply takes this to an extreme that this ... DLL, when a weak point is found (which, with Microsoft, is something ...
    (alt.lang.asm)
  • Re: In the Shallow End
    ... When a document claims how an API is supposed to be used and then gives the user examples that actually work, ... Vague in your instance means you have no context to VMS or UNIX of that era. ... Windows offers lots of this stuff. ... That's why Apple had to dump a whole paradigm to plunge ahead and take the lead. ...
    (comp.sys.mac.advocacy)
  • Re: IOCTL + XP SP2
    ... At least for many years developers have ... been able to use the this simple API to perform some NIC management. ... Thomas F. Divine, Windows DDK MVP ... > interface specifications) and it works also on Windows 2000 and on Windows ...
    (microsoft.public.development.device.drivers)
  • Re: a pre-beginners question: what is the pros and cons of .net, compared to ++
    ... as the windows forms architecture wraps a number of activex ... and retains backwards compatibility with both COM and the classic Win32 api. ... C++ cannot inherently do video capture either, since you have to import COM. ... Outlook or Word or IM programs, each of which would run in managed code ...
    (microsoft.public.dotnet.general)
  • Re: Interpreting a BAS module
    ... unicode and ansi strings. ... applications make calls out to Windows to ask it to do something (e.g. ... you have to utilize an API that is designed to ... AddressOf is also used in subclassing. ...
    (microsoft.public.vb.general.discussion)