17 #define INCL_DOSDATETIME
18 #define INCL_DOSPROCESS
19 #define INCL_WINWINDOWMGR
25 #define RANDOM_BUFSIZE 4096
29 #if defined(__32BIT__)
30 #define PTR(ptr, ofs) ((void *) ((char *) (ptr) + (ofs)))
32 #define DosQueryModuleName DosGetModName
33 #define APIENTRY16 APIENTRY
34 #if defined(M_I86SM) || defined(M_I86MM)
35 #define PTR(ptr, ofs) ((void *) ((char *) (ptr) + (ofs)))
37 #define PTR(ptr, ofs) ((void *) ((char *) (((ULONG) procstat & 0xFFFF0000) | (USHORT) (ptr)) + (ofs)))
45 USHORT _THUNK_FUNCTION(DosGetPrty) (USHORT usScope, PUSHORT pusPriority, USHORT pid);
47 USHORT _DosQProcStatus(PVOID pBuf, USHORT cbBuf)
50 _THUNK_FAR16(_emx_32to16(pBuf));
55 #define DosQProcStatus _DosQProcStatus
182 ULONG querybuffer[ 26 + 8 ];
193 DosQuerySysInfo( 1, 26, ( PVOID ) querybuffer,
sizeof( querybuffer ) );
194 addRandomData( randomState, querybuffer,
sizeof( querybuffer ) );
195 DosGetDateTime( &dt );
196 addRandomData( randomState, &dt,
sizeof( DATETIME ) );
199 DosGetInfoBlocks( &ptib, &ppib );
200 addRandom( randomState, ptib );
201 addRandom( randomState, ppib );
202 addRandomData( randomState, ptib,
sizeof( TIB ) );
203 addRandomData( randomState, ppib,
sizeof( PIB ) );
204 addRandomData( randomState, ptib->tib_ptib2,
sizeof( TIB2 ) );
208 if( !addedFixedItems )
211 addRandomData( randomState, ppib->pib_pchcmd,
212 strlen( ppib->pib_pchcmd ) );
213 addRandomData( randomState, ppib->pib_pchenv,
214 strlen( ppib->pib_pchenv ) );
215 addedFixedItems =
TRUE;
220 #define PTR(ptr, ofs) ((void *) ((char *) (ptr) + (ofs)))
230 procstat = malloc (0x8000);
233 addRandom( randomState, procstat );
234 addRandomData( randomState, procstat,
sizeof(
qsPtrRec_t ) );
236 for ( proc =
PTR( procstat->pProcRec, 0 );
237 proc -> RecType == 1;
246 addRandom( randomState, x );
253 endRandomData( randomState, 10 );
268 char pchBuffer[ 10 + 8 ];
274 hwndParent = HWND_DESKTOP;
275 henum = WinBeginEnumWindows( hwndParent );
276 while( ( hwndNext = WinGetNextWindow( henum ) ) != NULLHANDLE )
278 addRandom( randomState, hwndNext );
280 WinQueryWindowProcess( hwndNext, &pib, &tib );
281 addRandomData( randomState, &tib,
sizeof( TIB ) );
282 addRandomData( randomState, &pib,
sizeof( PIB ) );
283 WinQueryWindowRect( hwndNext, &rcl );
284 addRandomData( randomState, &rcl,
sizeof( RECTL ) );
286 fSuccess = WinEndEnumWindows( henum );
289 endRandomData( randomState, 50 );
300 DosGetInfoBlocks( &ptib, &ppib );
301 return ppib->pib_ulpid;