Changeset 1628 for trunk/src/kernel32/Fileio.cpp
- Timestamp:
- Nov 8, 1999, 2:43:13 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/Fileio.cpp
r1570 r1628 1 /* $Id: Fileio.cpp,v 1.1 3 1999-11-03 17:12:20 phallerExp $ */1 /* $Id: Fileio.cpp,v 1.14 1999-11-08 13:43:11 sandervl Exp $ */ 2 2 3 3 /* … … 30 30 #include "oslibdos.h" 31 31 32 33 32 ODINDEBUGCHANNEL(KERNEL32-FILEIO) 34 33 … … 360 359 nrbyteswritten, 361 360 lpOverlapped)); 362 }363 //******************************************************************************364 //******************************************************************************365 ODINFUNCTION6(DWORD, SearchPathA,366 LPCSTR, lpszPath,367 LPCSTR, lpszFile,368 LPCSTR, lpszExtension,369 DWORD, cchReturnBuffer,370 LPSTR, lpszReturnBuffer,371 LPSTR *, plpszFilePart)372 {373 LPSTR lpszFilePart;374 375 // @@@PH 1999/11/03 ANV.EXE seems to pass in NULL here, looks like376 // windows ignores that behaviour altough it's undocumented.377 if (plpszFilePart == NULL)378 plpszFilePart = &lpszFilePart; // just provide a valid pointer379 380 return O32_SearchPath(lpszPath,381 lpszFile,382 lpszExtension,383 cchReturnBuffer,384 lpszReturnBuffer,385 plpszFilePart);386 }387 //******************************************************************************388 //******************************************************************************389 ODINFUNCTION6(DWORD, SearchPathW,390 LPCWSTR, lpszPath,391 LPCWSTR, lpszFileName,392 LPCWSTR, lpszExtension,393 DWORD, cchReturnBufferLength,394 LPWSTR, lpszReturnBuffer,395 LPWSTR *, plpszFilePart)396 {397 char *asciipath,398 *asciifile,399 *asciiext,400 *asciibuffer,401 *asciipart;402 DWORD rc;403 404 asciibuffer = (char *)malloc(cchReturnBufferLength+1);405 asciipath = UnicodeToAsciiString((LPWSTR)lpszPath);406 asciifile = UnicodeToAsciiString((LPWSTR)lpszFileName);407 asciiext = UnicodeToAsciiString((LPWSTR)lpszExtension);408 rc = ODIN_SearchPathA(asciipath,409 asciifile,410 asciiext,411 cchReturnBufferLength,412 asciibuffer,413 &asciipart);414 415 if(rc)416 {417 AsciiToUnicode(asciibuffer, lpszReturnBuffer);418 *plpszFilePart = lpszReturnBuffer + ((int)asciipart - (int)asciibuffer);419 }420 421 FreeAsciiString(asciiext);422 FreeAsciiString(asciifile);423 FreeAsciiString(asciipath);424 free(asciibuffer);425 return(rc);426 361 } 427 362 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.