File:  [WindowsNT SDKs] / mstools / win32s / ut / samples / ut_def / db16.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:25:17 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntsdk-nov-1993, ntsdk-jul-1993, HEAD
Microsoft Windows NT Build 511 (SDK Final Release) 07-24-1993

/*++

Copyright (c) 1985-92, Microsoft Corporation

Module Name:

    db16.c

Abstract:

    Win32s sample code of Universal Thunk (UT) -
    services dispatcher in 16bit side.
    This is the main source file of DB16.DLL.

--*/

#define W32SUT_16

#include <windows.h>
#include <w32sut.h>
#include "db.h"


/*
 * constants for dispatcher in 16bit side
 */

#define DB_SRV_GETVERSION   0
#define DB_SRV_SETTIME      1
#define DB_SRV_ADDUSER      2


/*
 * 16bit dispatcher function.
 * exported by DB16.DLL
 */

DWORD FAR PASCAL
UTProc(LPVOID lpBuf, DWORD dwFunc)
{

    /*
     * call 16bit DB services based on the function Id.
     */

    switch (dwFunc) {

    case DB_SRV_GETVERSION:
        return( (DWORD) DbGetVersion() );

    case DB_SRV_SETTIME:
        DbSetTime((LPDB_TIME) lpBuf);
        return(0);

    case DB_SRV_ADDUSER:
        return( (DWORD) DbAddUser( (LPDB_NAME) ((LPDWORD)lpBuf) [0] ,
                                   (DWORD)     ((LPDWORD)lpBuf) [1] ,
                                   (LPDWORD)   ((LPDWORD)lpBuf) [2]
                                 )
              );

    }

    return( 0 );
}




unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.