comparison src/win32/IdleTracker/idletrack.c @ 11828:5c50be815a4e

[gaim-migrate @ 14119] Comment changes. This one was weird. We apparently had two copies of a couple big function calls. One copy per function was completely commented out with /* */ and had // comments describing the arguments. The other copies were just the straight function calls without comments. I moved the comments to the in-use function call, changing // to /* */ and removed the duplication. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 26 Oct 2005 00:33:21 +0000
parents 89ea4b4a9455
children 099bb2149158
comparison
equal deleted inserted replaced
11827:f588ced280bf 11828:5c50be815a4e
38 38
39 static DWORD* setup_shared_mem() { 39 static DWORD* setup_shared_mem() {
40 BOOL fInit; 40 BOOL fInit;
41 41
42 /* Set up the shared memory. */ 42 /* Set up the shared memory. */
43 /*hMapObject = CreateFileMapping((HANDLE) 0xFFFFFFFF, // use paging file 43 hMapObject = CreateFileMapping((HANDLE) 0xFFFFFFFF, /* use paging file */
44 NULL, // no security attributes 44 NULL, /* no security attributes */
45 PAGE_READWRITE, // read/write access 45 PAGE_READWRITE, /* read/write access */
46 0, // size: high 32-bits 46 0, /* size: high 32-bits */
47 sizeof(DWORD), // size: low 32-bits 47 sizeof(DWORD), /* size: low 32-bits */
48 "timermem"); // name of map object 48 "timermem"); /* name of map object */
49 */
50 hMapObject = CreateFileMapping((HANDLE) 0xFFFFFFFF,
51 NULL,
52 PAGE_READWRITE,
53 0,
54 sizeof(DWORD),
55 "timermem");
56 49
57 if (hMapObject == NULL) 50 if (hMapObject == NULL)
58 return NULL; 51 return NULL;
59 52
60 /* The first process to attach initializes memory. */ 53 /* The first process to attach initializes memory. */
61 fInit = (GetLastError() != ERROR_ALREADY_EXISTS); 54 fInit = (GetLastError() != ERROR_ALREADY_EXISTS);
62 55
63 /* Get a pointer to the file-mapped shared memory. */ 56 /* Get a pointer to the file-mapped shared memory. */
64 /*lastTime = (DWORD*) MapViewOfFile(hMapObject, // object to map view of 57 lastTime = (DWORD*) MapViewOfFile(hMapObject, /* object to map view of */
65 * FILE_MAP_WRITE, // read/write access 58 FILE_MAP_WRITE, /* read/write access */
66 * 0, // high offset: map from 59 0, /* high offset: map from */
67 * 0, // low offset: beginning 60 0, /* low offset: beginning */
68 * 0); // default: map entire file 61 0); /* default: map entire file */
69 */
70 lastTime = (DWORD*) MapViewOfFile(hMapObject,
71 FILE_MAP_WRITE,
72 0,
73 0,
74 0);
75 62
76 if (lastTime == NULL) 63 if (lastTime == NULL)
77 return NULL; 64 return NULL;
78 65
79 *lastTime = GetTickCount(); 66 *lastTime = GetTickCount();