Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <3C4F03CC.2090001@ece.gatech.edu>
Date: Wed, 23 Jan 2002 13:41:16 -0500
From: Charles Wilson <cwilson@ece.gatech.edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: touch
References: <200201231825.g0NIPKa09236@abrell.ac.upc.es> <20020123182841.GB16029@redhat.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Probably not even appropriate for THIS mailing list, Chris.  This is 
pure windows programming -- what does it have to do with cygwin?

However, I've addressed it below:

Christopher Faylor wrote:

> Wrong mailing list.  Redirected.
> 
> cgf
> 
> On Wed, Jan 23, 2002 at 07:25:20PM +0100, Ivan Martel Perez wrote:
> 
>>Hi all!
>>
>> I am trying to open a directory using Win32 API :
>>
>>       DWORD n;
>>       int n1;
>>       char a[100+1];
>>       HANDLE h;
>>
>>       h=CreateFile("c:\\bin\\cygwin",


I think you need to pass a non-shell-escaped filename to the windows 
CreateFile function:  h=CreateFile("c:\bin\cygwin",...

>>               GENERIC_READ|GENERIC_WRITE,
>>               FILE_SHARE_READ,
>>               NULL,
>>               OPEN_EXISTING|OPEN_ALWAYS,
>>               FILE_FLAG_BACKUP_SEMANTICS,
>>               NULL);
>>
>>       if(h==INVALID_HANDLE_VALUE) error();
>>
>>I always get and invalid handle and the error string "Access 
>>denied". I've been trying some flag changes without results.
>>
>>The program I'm writting is motivated because 'touch' does not
>>update directories.
>>
>>Is there a way to enable 'touching' dirs?


Dunno about this.

--Chuck


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

