|
|
1.1 root 1: /*++
2:
3: Copyright (c) 1985-92, Microsoft Corporation
4:
5: Module Name:
6:
7: db16.c
8:
9: Abstract:
10:
11: Win32s sample code of Universal Thunk (UT) -
12: services dispatcher in 16bit side.
13: This is the main source file of DB16.DLL.
14:
15: --*/
16:
17: #define W32SUT_16
18:
19: #include <windows.h>
20: #include <w32sut.h>
21: #include "db.h"
22:
23:
24: /*
25: * constants for dispatcher in 16bit side
26: */
27:
28: #define DB_SRV_GETVERSION 0
29: #define DB_SRV_SETTIME 1
30: #define DB_SRV_ADDUSER 2
31:
32:
33: /*
34: * 16bit dispatcher function.
35: * exported by DB16.DLL
36: */
37:
38: DWORD FAR PASCAL
39: UTProc(LPVOID lpBuf, DWORD dwFunc)
40: {
41:
42: /*
43: * call 16bit DB services based on the function Id.
44: */
45:
46: switch (dwFunc) {
47:
48: case DB_SRV_GETVERSION:
49: return( (DWORD) DbGetVersion() );
50:
51: case DB_SRV_SETTIME:
52: DbSetTime((LPDB_TIME) lpBuf);
53: return(0);
54:
55: case DB_SRV_ADDUSER:
56: return( (DWORD) DbAddUser( (LPDB_NAME) ((LPDWORD)lpBuf) [0] ,
57: (DWORD) ((LPDWORD)lpBuf) [1] ,
58: (LPDWORD) ((LPDWORD)lpBuf) [2]
59: )
60: );
61:
62: }
63:
64: return( 0 );
65: }
66:
67:
68:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.