Skip to content
Snippets Groups Projects
Commit 054adae8 authored by rswindell's avatar rswindell
Browse files

Work-arounds for Windows Vista:

Do not specify an init function, apparently not supported by Vista -
RegisterModule() fails with AX=1 when an InitFunc is specified.
Use AX to get the VDD handle (required for UART virtualization),
even though this value does not match the handle that was passed
to VDDInitialize().
parent 8c02b477
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,6 @@ HANDLE hungup_event=NULL;
HANDLE interrupt_event=NULL;
HANDLE rdslot=INVALID_HANDLE_VALUE;
HANDLE wrslot=INVALID_HANDLE_VALUE;
HANDLE vdd_handle;
RingBuf rdbuf;
str_list_t ini;
char ini_fname[MAX_PATH+1];
......@@ -461,13 +460,15 @@ __declspec(dllexport) void __cdecl VDDDispatch(void)
retval=0;
node_num=getBH();
lprintf(LOG_DEBUG,"VDD_OP: %d (arg=%X)", getBL(),getCX());
lprintf(LOG_DEBUG,"VDD_OP: (handle=%d) %d (arg=%X)", getAX(),getBL(),getCX());
vdd_calls++;
switch(getBL()) {
case VDD_OPEN:
sscanf("$Revision$", "%*s %s", revision);
lprintf(LOG_INFO,"Synchronet Virtual Device Driver, rev %s %s %s"
,revision, __DATE__, __TIME__);
#if 0
......@@ -545,7 +546,7 @@ __declspec(dllexport) void __cdecl VDDDispatch(void)
PortRange.First=uart_io_base;
PortRange.Last=uart_io_base + UART_IO_RANGE;
VDDInstallIOHook(vdd_handle, 1, &PortRange, &IOHandlers);
VDDInstallIOHook((HANDLE)getAX(), 1, &PortRange, &IOHandlers);
interrupt_event=CreateEvent(NULL,FALSE,FALSE,NULL);
InitializeCriticalSection(&interrupt_mutex);
......@@ -570,7 +571,7 @@ __declspec(dllexport) void __cdecl VDDDispatch(void)
if(virtualize_uart) {
lprintf(LOG_INFO,"Uninstalling Virtualizaed UART IO Hook");
VDDDeInstallIOHook(vdd_handle, 1, &PortRange);
VDDDeInstallIOHook((HANDLE)getAX(), 1, &PortRange);
}
CloseHandle(rdslot);
......@@ -779,13 +780,3 @@ __declspec(dllexport) void __cdecl VDDDispatch(void)
}
setAX((WORD)retval);
}
__declspec(dllexport) BOOL __cdecl VDDInitialize(IN PVOID hVDD, IN ULONG Reason,
IN PCONTEXT Context OPTIONAL)
{
sscanf("$Revision$", "%*s %s", revision);
vdd_handle=hVDD;
return TRUE;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment