b5 shmem questions
ULONG ulClientIp;
how does one convert that to a string ?
A: struct in_addr temp; temp.s_addr = pOnlineData->OnlineData.ulClientIp; strcpy(ip, inet_ntoa(temp));
-----
using DC_GET_ONLINEDATA, i get a ONLINEDATA struct containing only the Uid. What's the easiest way to get the primary group of that user ? I see only opening userfile and checking there..?
A: DC_USERFILE_OPEN, pUserFile->Gid, DC_USERFILE_CLOSE
-----
How can I know what local offsets needs to be set and what local offsets will contain the resulting struct after a SendMessage for each of the DC_xxx messages ?
I tried divination, like for my DC_GET_ONLINEDATA, I used:
PDC_ONLINEDATA pOnlineData = (PDC_ONLINEDATA)lpMessage->lpContext;
lpMessage->dwIdentifier = DC_GET_ONLINEDATA;
pOnlineData->iOffset = 0;
pOnlineData->dwSharedMemorySize = 4096;
but how do i know how i need to fill the pOnlineData->dwSharedMemorySize ?? This number is a random choice of a multiple of 2!
and my guess that the pOnlineData returned is at lpContext is pretty obvious here, since it's the only thing it should return, but how about the other messages ..?
-----
dwReturn = SendMessage(hIoFTPD, WM_KILL, iPos, (LPARAM)hMemory);
this returns 1 :\ should return 0... how can i use that message ?
-----
how can i get all the users on the site using shmem ? atm, i open UserIdTable and fetch all users from there.
-----
|