Commit 3b239dbc authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32: Implement K32GetProcessImageFileNameA().

parent 3a1194ed
...@@ -3479,8 +3479,7 @@ cleanup: ...@@ -3479,8 +3479,7 @@ cleanup:
*/ */
DWORD WINAPI K32GetProcessImageFileNameA( HANDLE process, LPSTR file, DWORD size ) DWORD WINAPI K32GetProcessImageFileNameA( HANDLE process, LPSTR file, DWORD size )
{ {
FIXME("(%p, %p, %d) stub\n", process, file, size ); return QueryFullProcessImageNameA(process, PROCESS_NAME_NATIVE, file, &size) ? size : 0;
return 0;
} }
/*********************************************************************** /***********************************************************************
......
...@@ -222,15 +222,15 @@ static void test_GetProcessImageFileName(void) ...@@ -222,15 +222,15 @@ static void test_GetProcessImageFileName(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)); 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); SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)); 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); SetLastError(0xdeadbeef);
pGetProcessImageFileNameA(hpQI, szImgPath, 0); 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)); ret = pGetProcessImageFileNameA(hpQI, szImgPath, sizeof(szImgPath));
ret1 = pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath)); ret1 = pGetMappedFileNameA(hpQV, hMod, szMapPath, sizeof(szMapPath));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment