Last change
on this file since 3524 was 3524, checked in by bird, 18 years ago |
kProfile Mark II. Some early/old code.
|
File size:
1.4 KB
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 |
|
---|
4 | /*******************************************************************************
|
---|
5 | * Header Files *
|
---|
6 | *******************************************************************************/
|
---|
7 | #include <Windows.h>
|
---|
8 |
|
---|
9 | #include "kProfileR3.h"
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * The DLL Main for the IPRT DLL.
|
---|
15 | *
|
---|
16 | * This is required for profiling, it is not (currently) used for any
|
---|
17 | * other purposes. (It could be used to track the death of alian threads
|
---|
18 | * perhaps, if we decide to adopt them automatically.)
|
---|
19 | *
|
---|
20 | * @returns Success indicator.
|
---|
21 | * @param hInstDll The instance handle of the DLL. (i.e. the module handle)
|
---|
22 | * @param fdwReason The reason why we're here. This is a 'flag' for reasons of
|
---|
23 | * tradition, it's really a kind of enum.
|
---|
24 | * @param pReserved Reserved / undocumented something.
|
---|
25 | */
|
---|
26 | BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, PVOID pReserved)
|
---|
27 | {
|
---|
28 | switch (fdwReason)
|
---|
29 | {
|
---|
30 | case DLL_PROCESS_ATTACH:
|
---|
31 | if (kPrfInitialize())
|
---|
32 | return FALSE;
|
---|
33 | break;
|
---|
34 |
|
---|
35 | case DLL_PROCESS_DETACH:
|
---|
36 | kPrfTerminate();
|
---|
37 | break;
|
---|
38 |
|
---|
39 | case DLL_THREAD_ATTACH:
|
---|
40 | break;
|
---|
41 |
|
---|
42 | case DLL_THREAD_DETACH:
|
---|
43 | kPrfTerminateThread();
|
---|
44 | break;
|
---|
45 | }
|
---|
46 |
|
---|
47 | return TRUE;
|
---|
48 | }
|
---|
49 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.