View Single Post
Old 09-09-2003, 09:55 AM  
Mouton
Posse Member
 
Join Date: Dec 2002
Posts: 1,956
Default

Code:
// Initial setup for DC_GET_ONLINEDATA
lpMessage->dwIdentifier	= DC_GET_ONLINEDATA;
PDC_ONLINEDATA pOnlineData = (PDC_ONLINEDATA)lpMessage->lpContext;
pOnlineData->iOffset = iPos;
pOnlineData->dwSharedMemorySize = 4096;

char username[64]="Unknown",pwd[_MAX_PWD + 1];

// Send Message
dwReturn = SendMessage(hIoFTPD, WM_SHMEM, NULL, (LPARAM)hMemory);
if (!dwReturn) {
	// Wait until processed (5 secs)
	WaitForSingleObject(hEvent, 5000);

	if (nPos == 1024) {
		printf("Error on kill: %i.\n",iPos);fflush(stdout);
		return 1;
	}

	strcpy(pwd,pOnlineData->OnlineData.szVirtualPath);
	resolveUidToName(pOnlineData->OnlineData.Uid,username);

	dwReturn = SendMessage(hIoFTPD, WM_KILL, iPos, (LPARAM)hMemory);
	if (!dwReturn) {
		printf("%s was kicked from %s\n",username,pwd);
	} else {
		printf("Error on kill: couldn't kill #%i (%s).\n",iPos,username);fflush(stdout);
		return 1;
	}
}
I get: Error on kill: couldn't kill #0 (nomaster).
What's wrong ? How can i debug that ?
Mouton is offline