So this is the function I am talking about
Code:
void ChangeMemory(DWORD baseadress, int value, DWORD offset1, DWORD offset2, bool msg)
{
	DWORD d, ds;
	DWORD* adress = (DWORD*)((*(DWORD*)(baseadress + offset1)) + offset2);	

	if (msg)
	{
		char szTest[10] ;
		sprintf_s(szTest, "The final adress is : %X", adress);
		MessageBoxA(NULL,szTest , NULL, NULL);
	}

	//VirtualProtect((LPVOID)adress, sizeof(value), PAGE_EXECUTE_READWRITE, &d);    
	*(int*)adress = value;
	//VirtualProtect((LPVOID)adress ,sizeof(value),d,&ds);
}
It is a wel known code, right? Well I am not so good in c++, but I need this function to be changed.
I have a base address and 2 offsets, and I know they are correct because In another base those work and I can perform my memory hack.
But with this function, I cant make it work, and I think I know why.
The current function needs to be putted like ChangeMemory(0x00000000, 10000, 0x0, 0x0, false);
But I need to get it working like ChangeMemory("Process name.exe"+0x00000000, 10000, 0x0, 0x0, false);
Can I just do it like this or will it not work??
Because in the other base I can declarz it with the processname, and there it works, so...

Thanks for the help