246cadf00c6978e351b6aa29ebe4d1c9a0c172b0
[reactos.git] / lib / crtdll / stdlib / fullpath.c
1 /*
2  * COPYRIGHT:   See COPYING in the top level directory
3  * PROJECT:     ReactOS system libraries
4  * FILE:        lib/crtdll/stdlib/fullpath.c
5  * PURPOSE:     Gets the fullpathname
6  * PROGRAMER:   Boudewijn Dekker
7  * UPDATE HISTORY:
8  *              28/12/98: Created
9  */
10 #include <windows.h>
11 #include <msvcrt/stdlib.h>
12
13 #undef fullpath
14 char *fullpath(char *absPath, const char *relPath, size_t maxLength)
15 {
16         return _fullpath(absPath,relPath,maxLength );
17 }
18
19 char* _fullpath(char* absPath, const char* relPath, size_t maxLength)
20 {
21     char* lpFilePart;
22
23         if (GetFullPathNameA(relPath,maxLength,absPath,&lpFilePart) == 0)
24                 return NULL;
25
26         return absPath;
27 }