Hi,
I don't know this VB function, but I know how to prevent you run your application many times.
Actually I have to say that this piece of code is not mine, but unfortunally I don't remember where a found it.
In your C***App class add a member function, for example
BOOL C***App::IsAlreadyRunning() {
HANDLE hEvent;
hEvent = CreateEvent(NULL, FALSE, TRUE, AfxGetAppaName());
if (GetLastError() == ERROR_ALREADY_EXISTS) {
return TRUE;
}
return FALSE;
}
So, in your C***App InitInstace method you just have to call this function and return FALSE if it is TRUE.
I use it for a "single document" application and it worked fine.
Hope this helps