thunk createDirectory and createFile calls

Max Bowsher maxb@ukf.net
Fri Nov 14 13:04:00 GMT 2003


Robert Collins wrote:
> Max Bowsher wrote:
>
>> Robert Collins wrote:
>>
>>> Max Bowsher wrote:
>>>
>>>
>>>
>>>> Also, I think LPCTSTR should be LPCSTR ? (and also in the
>>>> CreateFile case)
>>>>
>>>
>>> Not according to MSDN.
>>
>>
>> Can you give a link to the bit you are looking at?
>>
>>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/unicode_9i79.asp
>> seems to support my suggestion.
>
>
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp
>
> Look at the grey box :}.

Exactly. CreateFile takes LPCTSTR - but you are calling CreateFileA, which
takes LPCSTR.

Granted, LPCTSTR == LPCSTR when UNICODE is not defined - but if you are
relying on that, you don't need to bother with the "A" suffix on the
function, either.

Max.



More information about the Cygwin-patches mailing list