Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warning about a problem with GetFullPathName

106 views
Skip to first unread message

Christian Kaiser

unread,
May 26, 2000, 3:00:00 AM5/26/00
to
Hi,

in the GetFullPathName() docs, unfortunately it is not mentioned that the
in-buffer may not be the same as the out-buffer, or else GetFullPathName()
terminates the application.

It would be nice if this could be included in the SDK documentation and MSDN
knowledgebase.

Christian


Guillaume Landru

unread,
May 26, 2000, 3:00:00 AM5/26/00
to
In the doc, we can read:
DWORD GetFullPathName(
LPCTSTR lpFileName, // pointer to name of file to find path for
DWORD nBufferLength, // size, in characters, of path buffer
LPTSTR lpBuffer, // pointer to path buffer
LPTSTR *lpFilePart // pointer to file name in path
);

lpFileName is a LPCTSRT which is a CONST CHAR * or CONST WCHAR *
lpBuffer is a LPTSTR which is a CHAR * or WCHAR *

Cheers,
Guillaume.

Christian Kaiser wrote in message ...

Raymond Chen

unread,
May 31, 2000, 3:00:00 AM5/31/00
to
I have asked that this restriction be noted in the next edition
of the SDK. It is sort of hinted at by omission (the related
functions GetShort/LongPathName explicitly say that it is safe to
pass in=out but this one doesn't).
--
(My return address is intentionally invalid to foil spammers. Delete the
".---" to get my real address. I do this on my own time with my own money;
my responses are not to be considered official technical support or advice.
Personal requests for assistance will be ignored.)

Christian Kaiser

unread,
Jun 2, 2000, 3:00:00 AM6/2/00
to
Thank you.

It's only for the Unicode API, as the SBCS API uses buffers to convert the
parameters, so it will be different automatically in this case.

Fun thing is that in Win9x, they are allowed to be identical (at least, it
does not crash). Is there really different code?

Christian

Raymond Chen <raym...@microsoft.com.---> wrote in message
news:2jhbjsk8m4isir223...@4ax.com...

gregory...@gmail.com

unread,
Nov 21, 2014, 1:08:56 PM11/21/14
to
On Wednesday, May 31, 2000 9:00:00 AM UTC+2, Raymond Chen wrote:
> I have asked that this restriction be noted in the next edition
> of the SDK. It is sort of hinted at by omission (the related
> functions GetShort/LongPathName explicitly say that it is safe to
> pass in=out but this one doesn't).
> --
> (My return address is intentionally invalid to foil spammers. Delete the
> ".---" to get my real address. I do this on my own time with my own money;
> my responses are not to be considered official technical support or advice.
> Personal requests for assistance will be ignored.)

Looks like someone didn't get the memo.

As of 11/21/2014, there is no mention lpBuffer should differ from lpFileName

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx
0 new messages