ReactOS 0.4.16-dev-257-g6aa11ac
vddsup.c File Reference
#include "ntvdm.h"
#include <debug.h>
#include "emulator.h"
#include "vddsup.h"
#include "cpu/bop.h"
#include <isvbop.h>
Include dependency graph for vddsup.c:

Go to the source code of this file.

Classes

struct  _VDD_MODULE
 
struct  _VDD_USER_HANDLERS
 

Macros

#define NDEBUG
 
#define MAX_VDD_MODULES   0xFF + 1
 
#define ENTRY_TO_HANDLE(Entry)   ((Entry) + 1)
 
#define HANDLE_TO_ENTRY(Handle)   ((Handle) - 1)
 
#define IS_VALID_HANDLE(Handle)   ((Handle) > 0 && (Handle) <= MAX_VDD_MODULES)
 
#define ERROR_MEMORYVDD   L"Insufficient memory to load installable Virtual Device Drivers."
 
#define ERROR_REGVDD   L"Virtual Device Driver format in the registry is invalid."
 
#define ERROR_LOADVDD   L"An installable Virtual Device Driver failed Dll initialization."
 

Typedefs

typedef VOID(WINAPIVDD_PROC) (VOID)
 
typedef struct _VDD_MODULE VDD_MODULE
 
typedef struct _VDD_MODULEPVDD_MODULE
 
typedef struct _VDD_USER_HANDLERS VDD_USER_HANDLERS
 
typedef struct _VDD_USER_HANDLERSPVDD_USER_HANDLERS
 

Functions

static USHORT GetNextFreeVDDEntry (VOID)
 
static VOID WINAPI ThirdPartyVDDBop (LPWORD Stack)
 
static BOOL LoadInstallableVDD (VOID)
 
BOOL WINAPI VDDInstallUserHook (IN HANDLE hVdd, IN PFNVDD_UCREATE Ucr_Handler, IN PFNVDD_UTERMINATE Uterm_Handler, IN PFNVDD_UBLOCK Ublock_Handler, IN PFNVDD_URESUME Uresume_Handler)
 
BOOL WINAPI VDDDeInstallUserHook (IN HANDLE hVdd)
 
VOID VDDCreateUserHook (USHORT DosPDB)
 
VOID VDDTerminateUserHook (USHORT DosPDB)
 
VOID VDDBlockUserHook (VOID)
 
VOID VDDResumeUserHook (VOID)
 
VOID VDDSupInitialize (VOID)
 

Variables

static VDD_MODULE VDDList [MAX_VDD_MODULES] = {{NULL}}
 
static LIST_ENTRY VddUserHooksList = {&VddUserHooksList, &VddUserHooksList}
 

Macro Definition Documentation

◆ ENTRY_TO_HANDLE

#define ENTRY_TO_HANDLE (   Entry)    ((Entry) + 1)

Definition at line 52 of file vddsup.c.

◆ ERROR_LOADVDD

#define ERROR_LOADVDD   L"An installable Virtual Device Driver failed Dll initialization."

◆ ERROR_MEMORYVDD

#define ERROR_MEMORYVDD   L"Insufficient memory to load installable Virtual Device Drivers."

◆ ERROR_REGVDD

#define ERROR_REGVDD   L"Virtual Device Driver format in the registry is invalid."

◆ HANDLE_TO_ENTRY

#define HANDLE_TO_ENTRY (   Handle)    ((Handle) - 1)

Definition at line 53 of file vddsup.c.

◆ IS_VALID_HANDLE

#define IS_VALID_HANDLE (   Handle)    ((Handle) > 0 && (Handle) <= MAX_VDD_MODULES)

Definition at line 54 of file vddsup.c.

◆ MAX_VDD_MODULES

#define MAX_VDD_MODULES   0xFF + 1

Definition at line 48 of file vddsup.c.

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file vddsup.c.

Typedef Documentation

◆ PVDD_MODULE

◆ PVDD_USER_HANDLERS

◆ VDD_MODULE

◆ VDD_PROC

typedef VOID(WINAPI * VDD_PROC) (VOID)

Definition at line 22 of file vddsup.c.

◆ VDD_USER_HANDLERS

Function Documentation

◆ GetNextFreeVDDEntry()

static USHORT GetNextFreeVDDEntry ( VOID  )
static

Definition at line 60 of file vddsup.c.

61{
63 for (Entry = 0; Entry < ARRAYSIZE(VDDList); ++Entry)
64 {
65 if (VDDList[Entry].hDll == NULL) break;
66 }
67 return Entry;
68}
#define NULL
Definition: types.h:112
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
unsigned short USHORT
Definition: pedump.c:61
base of all file and directory entries
Definition: entries.h:83
static VDD_MODULE VDDList[MAX_VDD_MODULES]
Definition: vddsup.c:49

Referenced by ThirdPartyVDDBop().

◆ LoadInstallableVDD()

static BOOL LoadInstallableVDD ( VOID  )
static

Definition at line 253 of file vddsup.c.

254{
255// FIXME: These strings should be localized.
256#define ERROR_MEMORYVDD L"Insufficient memory to load installable Virtual Device Drivers."
257#define ERROR_REGVDD L"Virtual Device Driver format in the registry is invalid."
258#define ERROR_LOADVDD L"An installable Virtual Device Driver failed Dll initialization."
259
260 BOOL Success = TRUE;
261 LONG Error = 0;
262 DWORD Type = 0;
263 DWORD BufSize = 0;
264
265 HKEY hVDDKey;
266 LPCWSTR VDDKeyName = L"SYSTEM\\CurrentControlSet\\Control\\VirtualDeviceDrivers";
267 LPWSTR VDDValueName = L"VDD";
269
270 HANDLE hVDD;
271
272 /* Try to open the VDD registry key */
274 VDDKeyName,
275 0,
277 &hVDDKey);
279 {
280 /* If the key just doesn't exist, don't do anything else */
281 return TRUE;
282 }
283 else if (Error != ERROR_SUCCESS)
284 {
285 /* The key exists but there was an access error: display an error and quit */
287 return FALSE;
288 }
289
290 /*
291 * Retrieve the size of the VDD registry value
292 * and check that it's of REG_MULTI_SZ type.
293 */
294 Error = RegQueryValueExW(hVDDKey,
295 VDDValueName,
296 NULL,
297 &Type,
298 NULL,
299 &BufSize);
301 {
302 /* If the value just doesn't exist, don't do anything else */
303 Success = TRUE;
304 goto Quit;
305 }
306 else if (Error != ERROR_SUCCESS || Type != REG_MULTI_SZ)
307 {
308 /*
309 * The value exists but there was an access error or
310 * is of the wrong type: display an error and quit.
311 */
313 Success = FALSE;
314 goto Quit;
315 }
316
317 /* Allocate the buffer */
318 BufSize = (BufSize < 2*sizeof(WCHAR) ? 2*sizeof(WCHAR) : BufSize);
319 VDDList = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, BufSize);
320 if (VDDList == NULL)
321 {
323 Success = FALSE;
324 goto Quit;
325 }
326
327 /* Retrieve the list of VDDs to load */
328 if (RegQueryValueExW(hVDDKey,
329 VDDValueName,
330 NULL,
331 NULL,
334 {
336 Success = FALSE;
337 goto Quit;
338 }
339
340 /* Load the VDDs */
341 VDDValueName = VDDList;
342 while (*VDDList)
343 {
344 DPRINT1("Loading VDD '%S'... ", VDDList);
345 hVDD = LoadLibraryW(VDDList);
346 if (hVDD == NULL)
347 {
348 DbgPrint("Failed\n");
350 }
351 else
352 {
353 DbgPrint("Succeeded\n");
354 }
355 /* Go to next string */
356 VDDList += wcslen(VDDList) + 1;
357 }
358 VDDList = VDDValueName;
359
360Quit:
361 if (VDDList) RtlFreeHeap(RtlGetProcessHeap(), 0, VDDList);
362 RegCloseKey(hVDDKey);
363 return Success;
364}
#define BufSize
Definition: FsRtlTunnel.c:28
Type
Definition: Type.h:7
#define DPRINT1
Definition: precomp.h:8
INT __cdecl DisplayMessage(_In_opt_ HWND hWnd, _In_ UINT uType, _In_opt_ PCWSTR pszTitle, _In_opt_ PCWSTR pszFormatMessage,...)
Definition: reactos.c:211
BOOL Error
Definition: chkdsk.c:66
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define LoadLibraryW(x)
Definition: compat.h:747
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
@ Success
Definition: eventcreate.c:712
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DbgPrint
Definition: hal.h:12
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define REG_MULTI_SZ
Definition: nt_native.h:1501
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
unsigned char * LPBYTE
Definition: typedefs.h:53
#define ERROR_REGVDD
#define ERROR_MEMORYVDD
#define ERROR_LOADVDD
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by VDDSupInitialize().

◆ ThirdPartyVDDBop()

static VOID WINAPI ThirdPartyVDDBop ( LPWORD  Stack)
static

Definition at line 70 of file vddsup.c.

71{
72 /* Get the Function Number and skip it */
73 BYTE FuncNum = *(PBYTE)SEG_OFF_TO_PTR(getCS(), getIP());
74 setIP(getIP() + 1);
75
76 switch (FuncNum)
77 {
78 /* RegisterModule */
79 case 0:
80 {
82 WORD RetVal = 0;
83 WORD Entry = 0;
84 LPCSTR DllName = NULL,
85 InitRoutineName = NULL,
86 DispatchRoutineName = NULL;
87 HMODULE hDll = NULL;
88 VDD_PROC InitRoutine = NULL,
89 DispatchRoutine = NULL;
90
91 DPRINT("RegisterModule() called\n");
92
93 /* Clear the Carry Flag (no error happened so far) */
94 setCF(0);
95
96 /* Retrieve the next free entry in the table (used later on) */
99 {
100 DPRINT1("Failed to create a new VDD module entry\n");
101 Success = FALSE;
102 RetVal = 4;
103 goto Quit;
104 }
105
106 /* Retrieve the VDD name in DS:SI */
107 DllName = (LPCSTR)SEG_OFF_TO_PTR(getDS(), getSI());
108
109 /* Retrieve the initialization routine API name in ES:DI (optional --> ES=DI=0) */
110 if (TO_LINEAR(getES(), getDI()) != 0)
111 InitRoutineName = (LPCSTR)SEG_OFF_TO_PTR(getES(), getDI());
112
113 /* Retrieve the dispatch routine API name in DS:BX */
114 DispatchRoutineName = (LPCSTR)SEG_OFF_TO_PTR(getDS(), getBX());
115
116 DPRINT1("DllName = '%s' - InitRoutineName = '%s' - DispatchRoutineName = '%s'\n",
117 (DllName ? DllName : "n/a"),
118 (InitRoutineName ? InitRoutineName : "n/a"),
119 (DispatchRoutineName ? DispatchRoutineName : "n/a"));
120
121 /* Load the VDD DLL */
122 hDll = LoadLibraryA(DllName);
123 if (hDll == NULL)
124 {
125 DWORD LastError = GetLastError();
126 Success = FALSE;
127
128 if (LastError == ERROR_NOT_ENOUGH_MEMORY)
129 {
130 DPRINT1("Not enough memory to load DLL '%s'\n", DllName);
131 RetVal = 4;
132 goto Quit;
133 }
134 else
135 {
136 DPRINT1("Failed to load DLL '%s'; last error = %d\n", DllName, LastError);
137 RetVal = 1;
138 goto Quit;
139 }
140 }
141
142 /* Load the initialization routine if needed */
143 if (InitRoutineName)
144 {
145 InitRoutine = (VDD_PROC)GetProcAddress(hDll, InitRoutineName);
146 if (InitRoutine == NULL)
147 {
148 DPRINT1("Failed to load the initialization routine '%s'\n", InitRoutineName);
149 Success = FALSE;
150 RetVal = 3;
151 goto Quit;
152 }
153 }
154
155 /* Load the dispatch routine */
156 DispatchRoutine = (VDD_PROC)GetProcAddress(hDll, DispatchRoutineName);
157 if (DispatchRoutine == NULL)
158 {
159 DPRINT1("Failed to load the dispatch routine '%s'\n", DispatchRoutineName);
160 Success = FALSE;
161 RetVal = 2;
162 goto Quit;
163 }
164
165 /* If we reached this point, that means everything is OK */
166
167 /* Register the VDD DLL */
168 VDDList[Entry].hDll = hDll;
169 VDDList[Entry].DispatchRoutine = DispatchRoutine;
170
171 /* Call the initialization routine if needed */
172 if (InitRoutine) InitRoutine();
173
174 /* We succeeded. RetVal will contain a valid VDD DLL handle */
175 Success = TRUE;
176 RetVal = ENTRY_TO_HANDLE(Entry); // Convert the entry to a valid handle
177
178Quit:
179 if (!Success)
180 {
181 /* Unload the VDD DLL */
182 if (hDll) FreeLibrary(hDll);
183
184 /* Set the Carry Flag to indicate that an error happened */
185 setCF(1);
186 }
187 // else
188 // {
189 // /* Clear the Carry Flag (success) */
190 // setCF(0);
191 // }
192 setAX(RetVal);
193 break;
194 }
195
196 /* UnRegisterModule */
197 case 1:
198 {
199 WORD Handle = getAX();
200 WORD Entry = HANDLE_TO_ENTRY(Handle); // Convert the handle to a valid entry
201
202 DPRINT("UnRegisterModule() called\n");
203
204 /* Sanity checks */
205 if (!IS_VALID_HANDLE(Handle) || VDDList[Entry].hDll == NULL)
206 {
207 DPRINT1("Invalid VDD DLL Handle: %d\n", Entry);
208 /* Stop the VDM */
210 return;
211 }
212
213 /* Unregister the VDD DLL */
217 break;
218 }
219
220 /* DispatchCall */
221 case 2:
222 {
223 WORD Handle = getAX();
224 WORD Entry = HANDLE_TO_ENTRY(Handle); // Convert the handle to a valid entry
225
226 DPRINT("DispatchCall() called\n");
227
228 /* Sanity checks */
229 if (!IS_VALID_HANDLE(Handle) ||
230 VDDList[Entry].hDll == NULL ||
231 VDDList[Entry].DispatchRoutine == NULL)
232 {
233 DPRINT1("Invalid VDD DLL Handle: %d\n", Entry);
234 /* Stop the VDM */
236 return;
237 }
238
239 /* Call the dispatch routine */
241 break;
242 }
243
244 default:
245 {
246 DPRINT1("Unknown 3rd-party VDD BOP Function: 0x%02X\n", FuncNum);
247 setCF(1);
248 break;
249 }
250 }
251}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
VOID EmulatorTerminate(VOID)
Definition: emulator.c:503
#define TO_LINEAR(seg, off)
Definition: emulator.h:26
#define SEG_OFF_TO_PTR(seg, off)
Definition: emulator.h:32
unsigned short WORD
Definition: ntddk_ex.h:93
ULONG Handle
Definition: gdb_input.c:15
BYTE * PBYTE
Definition: pedump.c:66
#define DPRINT
Definition: sndvol32.h:73
VDD_PROC DispatchRoutine
Definition: vddsup.c:27
HMODULE hDll
Definition: vddsup.c:26
#define ENTRY_TO_HANDLE(Entry)
Definition: vddsup.c:52
#define IS_VALID_HANDLE(Handle)
Definition: vddsup.c:54
#define HANDLE_TO_ENTRY(Handle)
Definition: vddsup.c:53
static USHORT GetNextFreeVDDEntry(VOID)
Definition: vddsup.c:60
VOID(WINAPI * VDD_PROC)(VOID)
Definition: vddsup.c:22
#define MAX_VDD_MODULES
Definition: vddsup.c:48
USHORT WINAPI getIP(VOID)
Definition: registers.c:464
USHORT WINAPI getBX(VOID)
Definition: registers.c:170
USHORT WINAPI getDS(VOID)
Definition: registers.c:508
VOID WINAPI setCF(ULONG)
Definition: registers.c:573
USHORT WINAPI getSI(VOID)
Definition: registers.c:404
USHORT WINAPI getAX(VOID)
Definition: registers.c:114
USHORT WINAPI getES(VOID)
Definition: registers.c:522
USHORT WINAPI getDI(VOID)
Definition: registers.c:434
USHORT WINAPI getCS(VOID)
Definition: registers.c:480
VOID WINAPI setAX(USHORT)
Definition: registers.c:121
VOID WINAPI setIP(USHORT)
Definition: registers.c:471
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
const char * LPCSTR
Definition: xmlstorage.h:183
unsigned char BYTE
Definition: xxhash.c:193

Referenced by VDDSupInitialize().

◆ VDDBlockUserHook()

VOID VDDBlockUserHook ( VOID  )

Definition at line 479 of file vddsup.c.

480{
481 PLIST_ENTRY Pointer;
482 PVDD_USER_HANDLERS UserHook;
483
484 /* Call the hooks starting from the most recent ones */
485 for (Pointer = VddUserHooksList.Flink; Pointer != &VddUserHooksList; Pointer = Pointer->Flink)
486 {
487 UserHook = CONTAINING_RECORD(Pointer, VDD_USER_HANDLERS, Entry);
488 if (UserHook->Ublock_Handler) UserHook->Ublock_Handler();
489 }
490}
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
PFNVDD_UBLOCK Ublock_Handler
Definition: vddsup.c:40
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
static LIST_ENTRY VddUserHooksList
Definition: vddsup.c:56

Referenced by EmulatorPause().

◆ VDDCreateUserHook()

VOID VDDCreateUserHook ( USHORT  DosPDB)

Definition at line 453 of file vddsup.c.

454{
455 PLIST_ENTRY Pointer;
456 PVDD_USER_HANDLERS UserHook;
457
458 /* Call the hooks starting from the most recent ones */
459 for (Pointer = VddUserHooksList.Flink; Pointer != &VddUserHooksList; Pointer = Pointer->Flink)
460 {
461 UserHook = CONTAINING_RECORD(Pointer, VDD_USER_HANDLERS, Entry);
462 if (UserHook->Ucr_Handler) UserHook->Ucr_Handler(DosPDB);
463 }
464}
PFNVDD_UCREATE Ucr_Handler
Definition: vddsup.c:38

Referenced by DosLoadExecutableInternal().

◆ VDDDeInstallUserHook()

BOOL WINAPI VDDDeInstallUserHook ( IN HANDLE  hVdd)

Definition at line 420 of file vddsup.c.

421{
422 PLIST_ENTRY Pointer;
423 PVDD_USER_HANDLERS UserHook;
424
425 /* Check validity of the VDD handle */
426 if (hVdd == NULL || hVdd == INVALID_HANDLE_VALUE)
427 {
429 return FALSE;
430 }
431
432 /* Uninstall the latest installed hooks */
433 for (Pointer = VddUserHooksList.Flink; Pointer != &VddUserHooksList; Pointer = Pointer->Flink)
434 {
435 UserHook = CONTAINING_RECORD(Pointer, VDD_USER_HANDLERS, Entry);
436 if (UserHook->hVdd == hVdd)
437 {
438 RemoveEntryList(&UserHook->Entry);
439 RtlFreeHeap(RtlGetProcessHeap(), 0, UserHook);
440 return TRUE;
441 }
442 }
443
445 return FALSE;
446}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define RemoveEntryList(Entry)
Definition: env_spec_w32.h:986
LIST_ENTRY Entry
Definition: vddsup.c:35
HANDLE hVdd
Definition: testvdd.c:87

◆ VDDInstallUserHook()

BOOL WINAPI VDDInstallUserHook ( IN HANDLE  hVdd,
IN PFNVDD_UCREATE  Ucr_Handler,
IN PFNVDD_UTERMINATE  Uterm_Handler,
IN PFNVDD_UBLOCK  Ublock_Handler,
IN PFNVDD_URESUME  Uresume_Handler 
)

Definition at line 375 of file vddsup.c.

380{
381 PVDD_USER_HANDLERS UserHook;
382
383 /* Check validity of the VDD handle */
384 if (hVdd == NULL || hVdd == INVALID_HANDLE_VALUE)
385 {
387 return FALSE;
388 }
389
390 // NOTE: If we want that a VDD can install hooks only once, it's here
391 // that we need to check whether a hook entry is already registered.
392
393 /* Create and initialize a new hook entry... */
394 UserHook = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof(*UserHook));
395 if (UserHook == NULL)
396 {
398 return FALSE;
399 }
400
401 UserHook->hVdd = hVdd;
402 UserHook->Ucr_Handler = Ucr_Handler;
403 UserHook->Uterm_Handler = Uterm_Handler;
404 UserHook->Ublock_Handler = Ublock_Handler;
405 UserHook->Uresume_Handler = Uresume_Handler;
406
407 /* ... and add it at the top of the list of hooks */
409
410 return TRUE;
411}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define InsertHeadList(ListHead, Entry)
PFNVDD_UTERMINATE Uterm_Handler
Definition: vddsup.c:39
PFNVDD_URESUME Uresume_Handler
Definition: vddsup.c:41

◆ VDDResumeUserHook()

VOID VDDResumeUserHook ( VOID  )

Definition at line 492 of file vddsup.c.

493{
494 PLIST_ENTRY Pointer;
495 PVDD_USER_HANDLERS UserHook;
496
497 /* Call the hooks starting from the most recent ones */
498 for (Pointer = VddUserHooksList.Flink; Pointer != &VddUserHooksList; Pointer = Pointer->Flink)
499 {
500 UserHook = CONTAINING_RECORD(Pointer, VDD_USER_HANDLERS, Entry);
501 if (UserHook->Uresume_Handler) UserHook->Uresume_Handler();
502 }
503}

Referenced by EmulatorResume().

◆ VDDSupInitialize()

VOID VDDSupInitialize ( VOID  )

Definition at line 506 of file vddsup.c.

507{
508 /* Register the 3rd-party VDD BOP Handler */
510
511 /* Load the installable VDDs from the registry */
513}
VOID RegisterBop(BYTE BopCode, EMULATOR_BOP_PROC BopHandler)
Definition: bop.c:29
#define BOP_3RDPARTY
Definition: isvbop.h:30
static BOOL LoadInstallableVDD(VOID)
Definition: vddsup.c:253
static VOID WINAPI ThirdPartyVDDBop(LPWORD Stack)
Definition: vddsup.c:70

Referenced by EmulatorInitialize().

◆ VDDTerminateUserHook()

VOID VDDTerminateUserHook ( USHORT  DosPDB)

Definition at line 466 of file vddsup.c.

467{
468 PLIST_ENTRY Pointer;
469 PVDD_USER_HANDLERS UserHook;
470
471 /* Call the hooks starting from the most recent ones */
472 for (Pointer = VddUserHooksList.Flink; Pointer != &VddUserHooksList; Pointer = Pointer->Flink)
473 {
474 UserHook = CONTAINING_RECORD(Pointer, VDD_USER_HANDLERS, Entry);
475 if (UserHook->Uterm_Handler) UserHook->Uterm_Handler(DosPDB);
476 }
477}

Referenced by DosTerminateProcess().

Variable Documentation

◆ VDDList

VDD_MODULE VDDList[MAX_VDD_MODULES] = {{NULL}}
static

Definition at line 49 of file vddsup.c.

Referenced by GetNextFreeVDDEntry(), LoadInstallableVDD(), and ThirdPartyVDDBop().

◆ VddUserHooksList

LIST_ENTRY VddUserHooksList = {&VddUserHooksList, &VddUserHooksList}
static