you can do something like
Code:
if(!CreateProcess(name,...))
{
printf("err createprocess");
return 0;
}
DebugLoop:
WaitForDebugEvent(&DebugEvent, INFINITE);
if(DebugEvent.dwDebugEventCode==LOAD_DLL_DEBUG_EVENT)
{
//DebugEvent.u.LoadDll.lpBaseOfDll - is base of dll
}
.
.
.
maybe it helps