/*****************************************************************************
 * Copyright (C) Gemalto M2M GmbH
 *****************************************************************************
 * Project: IMC-RIL-Driver
 *****************************************************************************
 * Author : Wireless Modules RD SW A2
 *****************************************************************************
 * $Workfile: Y:/z_ms-d/src/working/Quinn/RilDrv/ntcalls.h $
 * $Revision: /main/ms-d/3 $
 *     $Date: 2008-08-22 10:24:52 $
 *   $Author: ctna0256 $
 *****************************************************************************
 * Target:
 *  Microsoft Windows Mobile 5.0
 *****************************************************************************
 * Description:
 *  Gemalto IMC RIL
 *****************************************************************************
 *
 * $Log: Y:/z_ms-d/src/working/Quinn/RilDrv/ntcalls.h$ 
 * 
 * /main/ms-d/3   2008-08-22 10:24:52   ctna0256 
 * Set Cinterion copyright text 
 * 
 * /main/ms-d/2   2008-08-21 09:34:57   ctna0256 
 * Prepared for new disclaimer handling 
 * 
 * /main/ms-d/1   2006-10-25 16:51:09   wm36264 
 * First transformation from classic RIL
 *
*/

//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2008 Gemalto M2M GmbH
// Copyright (C) 2006-2008 Siemens AG
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//
// Version: 1.0
// Date:    dummy
//
//////////////////////////////////////////////////////////////////////////////

/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-1999  Microsoft Corporation
--*/

#pragma once

#ifdef UNDER_CE

#define DOWNST_READFILE(handle, buf, len, read)        ReadFile(handle, buf, len, read, NULL)
#define DOWNST_WRITEFILE(handle, buf, len, written)    WriteFile(handle, buf, len, written, NULL)
#define DOWNST_WAITCOMMEVENT(handle, mask)             WaitCommEvent(handle, mask, NULL)

#else  // UNDER_CE

#define DOWNST_READFILE(handle, buf, len, read)        PerformOverlappedIO(OVERLAPPED_READ, handle, buf, len, read)
#define DOWNST_WRITEFILE(handle, buf, len, written)    PerformOverlappedIO(OVERLAPPED_WRITE, handle, (void*)buf, len, written)
#define DOWNST_WAITCOMMEVENT(handle, mask)             PerformOverlappedIO(OVERLAPPED_WAIT, handle, NULL, 0, mask)

#endif // UNDER_CE


