kernel32: Implement K32GetProcessImageFileNameA().

This commit is contained in:
Francois Gouget 2011-08-05 09:56:26 +02:00 committed by Alexandre Julliard
parent 3a1194edd7
commit 3b239dbc62
2 changed files with 4 additions and 5 deletions

View File

@ -3479,8 +3479,7 @@ cleanup:
*/
DWORD WINAPI K32GetProcessImageFileNameA( HANDLE process, LPSTR file, DWORD size )
{
FIXME("(%p, %p, %d) stub\n", process, file, size );
return 0;
return QueryFullProcessImageNameA(process, PROCESS_NAME_NATIVE, file, &size) ? size : 0;
}
/***********************************************************************

View File

@ -222,15 +222,15 @@ static void test_GetProcessImageFileName(void)
SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath));
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError());
ok(GetLastError() == ERROR_INVALID_HANDLE, "expected error=ERROR_INVALID_HANDLE but got %d\n", GetLastError());
SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath));
todo_wine ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
ok(GetLastError() == ERROR_ACCESS_DENIED, "expected error=ERROR_ACCESS_DENIED but got %d\n", GetLastError());
SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(hpQI, szImgPath, 0);
todo_wine ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected error=ERROR_INSUFFICIENT_BUFFER but got %d\n", GetLastError());
ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath));
ret1 = pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath));