res = ::NetScheduleJobEnum(NULL,
(LPBYTE*)&buffPtr,
MAX_PREFERRED_LENGTH,
&nrRead,
&posRead,
NULL);
if(res != 0)
{
int i;
}
else
for(ai = buffPtr, cnt = 0; cnt < nrRead; cnt++, ++buffPtr)
{
str.Format(L"Jobid: %d Command: %s", ai->JobId, ai->Command);
::AfxMessageBox(str);
}
if(buffPtr != NULL)
{
NetApiBufferFree(buffPtr);
}
ULL)
{
NetApiBufferFree(buffPtr);
}
ULL)
{
NetApiBufferFree(buffPtr);
}