If VB is to easy for you try C++:
Code:
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
struct dll{
char dp[_MAX_PATH];
char windowname[_MAX_PATH];
};
int main(){
HWND hwnd;
HANDLE hproc;
HANDLE htread;
DWORD dwpid = 1;
DWORD hmodule;
HINSTANCE hk32 = LoadLibrary( TEXT("kernel32.dll"));
void *praddres;
dll d= { "C:\\TestDLL.dll", "SpellForce 2" }; // edit your dll path and your procces here
hwnd = FindWindowA(NULL, d.windowname);
GetWindowThreadProcessId(hwnd, &dwpid);
hproc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwpid);
praddres = VirtualAllocEx( hproc, NULL, sizeof(d.dp), MEM_COMMIT | MEM_RESERVE, 0x40 );
WriteProcessMemory( hproc, praddres, (void*)d.dp, sizeof(d.dp), NULL);
htread = CreateRemoteThread( hproc, NULL, 0,(LPTHREAD_START_ROUTINE) GetProcAddress( hk32, "LoadLibraryA" ),praddres, 0, NULL );
WaitForSingleObject( htread, INFINITE );
GetExitCodeThread( htread, &hmodule );
CloseHandle( htread );
VirtualFreeEx( hproc, praddres, sizeof(d.dp), MEM_RELEASE );
cout<<"Done\n";
cin.ignore();
return 0;
}
It doesn't work for CA tough, but it should give you the idea