Get VU of VSXu artiste with C++

this is my code so far:

#include "iostream"
#include "Windows.h"
#include "stdio.h"
using namespace std;

int main() {

    HWND hWnd = FindWindow(NULL,TEXT("Vovoid VSXu Artiste 0.4.0 [Windows 64-bit]"));
    if (hWnd == 0) {
        cerr << "Cannot find window "<< endl;
    else {
        DWORD pId;
        GetWindowThreadProcessId(hWnd, &pId);
        cout << "Found Window at "<<pId << endl;
        HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
        HMODULE hModule = GetModuleHandle(TEXT("sound.rtaudio.dll"));

        if (hProc == 0) {
            cerr << "Cannot open process." << endl;
        }else if(hModule==0){
            DWORD error = GetLastError();
            cerr << "could not find Module -> error: " <<error<< endl;
        else {
            float val = 0;
            int addr = 0x04D40000 + 0x19098;//should be sound.rtaudio.dll+ 0x19098
                int suc = ReadProcessMemory(hProc, (LPVOID)addr, &val, (DWORD)sizeof(val), NULL);
                if (suc > 0) {
                    cout << "Success reading " << val << " of " << hex << addr << endl;
                else {
                    DWORD error = GetLastError();
                    cerr << "fail " << error << endl;

    return 0;

I want to read the VU (sound card volume) value of the VSXu Artiste sound visualisation programm with C++ and with the help of Cheat Engine. It works perfectly fine with ReadProcessMemory(hProc, (LPVOID)addr, &val, (DWORD)sizeof(val), NULL); until you re-open VSXu. This is pretty obvious, because the address of my value in Cheat Engine is “sound.rtaudio.dll+19098” and the DLL loads to a “random” address.
In Cheat Engine you can simply press Ctrl+G in the memory viewer and type the name of the DLL to find its base address. I have already tried the GetModuleHandle method in C++ without success:

HMODULE hModule = GetModuleHandle(TEXT("sound.rtaudio.dll"));

Has anyone an idea how to get the base address of the dll with C++?

Cheat Engine screenshot:

Kind regards,


Source: dll

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.