We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xenos_2.3.2.7z =>Xenos64.exe size (1367KB) i build source => Xenos64.exe size (1309KB)
I use xenos64.exe compiled by myself to inject DLL, and hook VTable does not work, But using Release xenos64.exe its's works well. this is my hook dll code //----------------------------------------------------------------------------- #include <windows.h> #include <Audioclient.h> #include <mmdeviceapi.h> #include "detours.h" #pragma comment(lib,"detours.lib") typedef HRESULT(STDMETHODCALLTYPE *GetDefaultAudioEndpoint_t)( IMMDeviceEnumerator * This,In EDataFlow dataFlow,In ERole role,Out IMMDevice **ppEndpoint); HRESULT STDMETHODCALLTYPE Hook_GetDefaultAudioEndpoint(IMMDeviceEnumerator * This,In EDataFlow dataFlow, In ERole role,Out IMMDevice **ppEndpoint) { HRESULT hr = S_OK; MessageBox(0, L"Hook_GetDefaultAudioEndpoint", 0, 0); return hr; }
void hook_audio() { MessageBox(0, L"hook_audio", 0, 0); CoInitialize(NULL); IMMDeviceCollection* devs = NULL; IMMDeviceEnumerator deviceEnumerator = NULL; IMMDevice device = NULL; HRESULT hr; uintptr_t vtable; void old_GetDefaultAudioEndpoint = NULL; bool ret = false; hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void)&deviceEnumerator); hr = deviceEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device); vtable = (uintptr_t*)deviceEnumerator; old_GetDefaultAudioEndpoint = (void*)vtable[4]; DetourTransactionBegin(); DetourUpdateThread(GetCurrentThread()); DetourAttach(&old_GetDefaultAudioEndpoint, &Hook_GetDefaultAudioEndpoint); auto error =DetourTransactionCommit(); }
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { if(DLL_PROCESS_ATTACH == ul_reason_for_call) hook_audio(); return TRUE; } //------------------------------------------------------------------------
Use Release Xenos64.exe Use My Xenos64.exe it's not jump my hook function
Who can tell me the difference OS: win10 19041.324/17134.1488
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Xenos_2.3.2.7z =>Xenos64.exe size (1367KB)
i build source => Xenos64.exe size (1309KB)
I use xenos64.exe compiled by myself to inject DLL, and hook VTable does not work,
But using Release xenos64.exe its's works well.
this is my hook dll code
//-----------------------------------------------------------------------------
#include <windows.h>
#include <Audioclient.h>
#include <mmdeviceapi.h>
#include "detours.h"
#pragma comment(lib,"detours.lib")
typedef HRESULT(STDMETHODCALLTYPE *GetDefaultAudioEndpoint_t)( IMMDeviceEnumerator * This,In EDataFlow dataFlow,In ERole role,Out IMMDevice **ppEndpoint);
HRESULT STDMETHODCALLTYPE Hook_GetDefaultAudioEndpoint(IMMDeviceEnumerator * This,In EDataFlow dataFlow, In ERole role,Out IMMDevice **ppEndpoint)
{
HRESULT hr = S_OK;
MessageBox(0, L"Hook_GetDefaultAudioEndpoint", 0, 0);
return hr;
}
void hook_audio()
{
MessageBox(0, L"hook_audio", 0, 0);
CoInitialize(NULL);
IMMDeviceCollection* devs = NULL;
IMMDeviceEnumerator deviceEnumerator = NULL;
IMMDevice device = NULL;
HRESULT hr;
uintptr_t vtable;
void old_GetDefaultAudioEndpoint = NULL;
bool ret = false;
hr = CoCreateInstance(__uuidof(MMDeviceEnumerator), NULL, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), (void)&deviceEnumerator);
hr = deviceEnumerator->GetDefaultAudioEndpoint(eRender, eConsole, &device);
vtable = (uintptr_t*)deviceEnumerator;
old_GetDefaultAudioEndpoint = (void*)vtable[4];
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&old_GetDefaultAudioEndpoint, &Hook_GetDefaultAudioEndpoint);
auto error =DetourTransactionCommit();
}
BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
if(DLL_PROCESS_ATTACH == ul_reason_for_call)
hook_audio();
return TRUE;
}
//------------------------------------------------------------------------
Use Release Xenos64.exe
Use My Xenos64.exe
it's not jump my hook function
Who can tell me the difference
OS: win10 19041.324/17134.1488
The text was updated successfully, but these errors were encountered: