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

在调用 RemoteHooking.Inject 时,报错

查看easyhook源代码,出错位置如下

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;
}

问题源头是 CreateFileW 这里失败,但是我手动调用CreateFileW传入dllPath也没有失败啊,很奇怪

猜你喜欢

转载自www.cnblogs.com/code1992/p/11583232.html
今日推荐