easyhook报错The given 64-Bit library does not exist

Calling  RemoteHooking.Inject , the error

 

 

See easyhook source, the following error location

if(!RtlFileExists(UserLibrary))
    {
    #ifdef _M_X64
        THROW(STATUS_INVALID_PARAMETER_5, L"The given 64-Bit library does not exist!");
    #else
        THROW(STATUS_INVALID_PARAMETER_4, L"The given 32-Bit library does not exist!");
    #endif
    }

 

BOOL RtlFileExists(WCHAR* InPath)
{
    HANDLE          hFile;

    if((hFile = CreateFileW(InPath, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
        return FALSE;

    CloseHandle(hFile);

    return TRUE;
}

 

 

Source of the problem is  CreateFileW  failures here, but I manually call CreateFileW incoming dllPath did not fail ah, very strange

 

Guess you like

Origin www.cnblogs.com/code1992/p/11583232.html