1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS IP Route Priority API DLL
4 * FILE: iprtprio.c
5 * PURPOSE: DLL entry
6 * PROGRAMMERS: Robert Dickenson (robd@reactos.org)
7 * REVISIONS:
8 * RDD August 27, 2002 Created
9 */
10
11 #include <stdio.h>
12 #include <windows.h>
13 #include <tchar.h>
14 #include <time.h>
15
16 #include <iptypes.h>
17 #include <ipexport.h>
18 //#include <mprapi.h>
19 //#include <iprtprio.h>
20 //#include "iprtprio.h"
21 #include "debug.h"
22
23 #ifdef __GNUC__
24 #define EXPORT WINAPI
25 #else
26 #define EXPORT CALLBACK
27 #endif
28
29 #if DBG
30 /* See debug.h for debug/trace constants */
31 DWORD DebugTraceLevel = MAX_TRACE;
32 #endif /* DBG */
33
34 typedef struct tag_somestruct {
35 int size;
36 TCHAR szData[2345];
37 } somestruct;
38
39 BOOL Initialised = FALSE;
40 CRITICAL_SECTION CriticalSection;
41
42 /* To make the linker happy */
43 //VOID WINAPI KeBugCheck (ULONG BugCheckCode) {}
44
45 BOOL
46 EXPORT
DllMain(HANDLE hInstDll,ULONG dwReason,PVOID Reserved)47 DllMain(HANDLE hInstDll,
48 ULONG dwReason,
49 PVOID Reserved)
50 {
51 //WSH_DbgPrint(MIN_TRACE, ("DllMain of iprtprio.dll\n"));
52 if (!Initialised) {
53 InitializeCriticalSection(&CriticalSection);
54 }
55
56 switch (dwReason) {
57 case DLL_PROCESS_ATTACH:
58 /* Don't need thread attach notifications so disable them to improve performance */
59 DisableThreadLibraryCalls(hInstDll);
60 break;
61
62 case DLL_THREAD_ATTACH:
63 break;
64
65 case DLL_THREAD_DETACH:
66 break;
67
68 case DLL_PROCESS_DETACH:
69 break;
70 }
71 return TRUE;
72 }
73
74 DWORD
75 WINAPI
ComputeRouteMetric(IPAddr unknown1,IPMask unknown2,DWORD unknown3,DWORD unknown4)76 ComputeRouteMetric(IPAddr unknown1, IPMask unknown2, DWORD unknown3, DWORD unknown4)
77 {
78 BYTE* buf = NULL;
79
80 buf = HeapAlloc(GetProcessHeap(), 0, sizeof(somestruct));
81 if (buf != NULL) {
82 HeapFree(GetProcessHeap(), 0, buf);
83 }
84
85 EnterCriticalSection(&CriticalSection);
86 LeaveCriticalSection(&CriticalSection);
87
88 UNIMPLEMENTED
89 return 0L;
90 }
91
92
93 DWORD
94 WINAPI
GetPriorityInfo(DWORD unknown)95 GetPriorityInfo(DWORD unknown)
96 {
97 DWORD result = NO_ERROR;
98
99 EnterCriticalSection(&CriticalSection);
100 LeaveCriticalSection(&CriticalSection);
101
102 UNIMPLEMENTED
103 return result;
104 }
105
106 DWORD
107 WINAPI
SetPriorityInfo(DWORD unknown)108 SetPriorityInfo(DWORD unknown)
109 {
110 DWORD result = NO_ERROR;
111
112 EnterCriticalSection(&CriticalSection);
113 LeaveCriticalSection(&CriticalSection);
114
115 UNIMPLEMENTED
116 return result;
117 }
118
119 /* EOF */
120