This is the mail archive of the
cygwin-developers@sourceware.cygnus.com
mailing list for the Cygwin project.
Minimal rapi inclusion to w32api
- To: Mumit Khan <khan at xraylith dot wisc dot EDU>, cygwin-developers at sourceware dot cygnus dot com
- Subject: Minimal rapi inclusion to w32api
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Thu, 17 Feb 2000 11:12:27 -0500
- Reply-To: cygwin-developers at sourceware dot cygnus dot com
Hi Mumit,
I hope you will accept the following addition to w32api. It adds
minimal RAPI functionality. RAPI is required for Windows to communicate
with a Windows CE device.
This functionality will be showing up in gdb soon, so I'd like to officially
get this into w32api. Hopefully you agree.
cgf
Thu Feb 17 11:09:51 2000 Christopher Faylor <cgf@cygnus.com>
* include/rapi.h: New file.
* lib/rapi.h: New file.
--- /dev/null Thu Feb 17 11:08:36 2000
+++ winsup/w32api/rapi.h Sun Aug 1 23:37:57 1999
@@ -0,0 +1,64 @@
+/*
+ rapi.h - main header file for the RAPI
+
+ Copyright 1999 Cygnus Solutions.
+
+ This file is part of Cygwin.
+
+ This software is a copyrighted work licensed under the terms of the
+ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+ details.
+*/
+
+#ifndef _RAPI_H
+#define _RAPI_H
+
+typedef struct IRAPIStream
+{
+ struct IRAPIStreamVtbl * lpVtbl;
+} IRAPIStream;
+
+typedef struct IRAPIStreamVtbl IRAPIStreamVtbl;
+
+typedef enum tagRAPISTREAMFLAG
+{
+ STREAM_TIMEOUT_READ
+} RAPISTREAMFLAG;
+
+struct IRAPIStreamVtbl
+{
+ HRESULT (__stdcall * SetRapiStat)( IRAPIStream * This, RAPISTREAMFLAG Flag, DWORD dwValue) ;
+ HRESULT (__stdcall * GetRapiStat)( IRAPIStream * This, RAPISTREAMFLAG Flag, DWORD *pdwValue) ;
+};
+
+// RAPI extension on Windows CE (e.g., MyFunctionFOO) called via CeRapiInvoke should be declared as:
+// EXTERN_C RAPIEXT MyFunctionFOO;
+typedef HRESULT (STDAPICALLTYPE RAPIEXT)(
+ DWORD cbInput, // [IN]
+ BYTE *pInput, // [IN]
+ DWORD *pcbOutput, // [OUT]
+ BYTE **ppOutput, // [OUT]
+ IRAPIStream *pIRAPIStream // [IN]
+ );
+
+typedef struct _RAPIINIT
+{
+ DWORD cbSize;
+ HANDLE heRapiInit;
+ HRESULT hrRapiInit;
+} RAPIINIT;
+
+STDAPI CeRapiInit();
+STDAPI CeRapiInitEx(RAPIINIT*);
+STDAPI_(BOOL) CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES,
+ BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, LPPROCESS_INFORMATION);
+STDAPI CeRapiUninit();
+
+STDAPI_(BOOL) CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED);
+STDAPI_(HANDLE) CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
+STDAPI_(BOOL) CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES);
+STDAPI_(DWORD) CeGetLastError(void);
+STDAPI_(BOOL) CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME);
+STDAPI_(BOOL) CeCloseHandle(HANDLE);
+
+#endif /* _RAPI_H */
--- /tmp/rapi.def Thu Feb 17 11:08:44 2000
+++ lib/rapi.def Mon Feb 14 16:42:05 2000
@@ -0,0 +1,84 @@
+LIBRARY RAPI.DLL
+EXPORTS
+CeCheckPassword@4
+CeCloseHandle@4
+CeCopyFile@12
+CeCreateDatabase@16
+CeCreateDirectory@8
+CeCreateFile@28
+CeCreateProcess@40
+CeDeleteDatabase@4
+CeDeleteFile@4
+CeDeleteRecord@8
+CeFindAllDatabases@16
+CeFindAllFiles@16
+CeFindClose@4
+CeFindFirstDatabase@4
+CeFindFirstFile@8
+CeFindNextDatabase@4
+CeFindNextFile@8
+CeGetClassName@12
+CeGetDesktopDeviceCaps@4
+CeGetFileAttributes@4
+CeGetFileSize@8
+CeGetFileTime@16
+CeGetLastError@0
+CeGetSpecialFolderPath@12
+CeGetStoreInformation@4
+CeGetSystemInfo@4
+CeGetSystemMetrics@4
+CeGetSystemPowerStatusEx@8
+CeGetTempPath@8
+CeGetVersionEx@4
+CeGetWindow@8
+CeGetWindowLong@8
+CeGetWindowText@12
+CeGlobalMemoryStatus@4
+CeMoveFile@8
+CeOidGetInfo@8
+CeOpenDatabase@20
+CeRapiFreeBuffer@4
+CeRapiGetError@0
+CeRapiInit@0
+CeRapiInitEx@4
+CeRapiInvoke@32
+CeRapiUninit@0
+CeReadFile@20
+CeReadRecordProps@24
+CeRegCloseKey@4
+CeRegCreateKeyEx@36
+CeRegDeleteKey@8
+CeRegDeleteValue@8
+CeRegEnumKeyEx@32
+CeRegEnumValue@32
+CeRegOpenKeyEx@20
+CeRegQueryInfoKey@48
+CeRegQueryValueEx@24
+CeRegSetValueEx@24
+CeRemoveDirectory@4
+CeSHCreateShortcut@8
+CeSHGetShortcutTarget@12
+CeSeekDatabase@16
+CeSetDatabaseInfo@8
+CeSetEndOfFile@4
+CeSetFileAttributes@8
+CeSetFilePointer@16
+CeSetFileTime@16
+CeWriteFile@20
+CeWriteRecordProps@16
+GetRapiError@0
+RAPI_EXP_10@4
+RAPI_EXP_11@8
+RAPI_EXP_12@4
+RAPI_EXP_13@0
+RAPI_EXP_14@4
+RAPI_EXP_15@4
+RAPI_EXP_16@0
+RAPI_EXP_17@8
+RAPI_EXP_18@8
+RAPI_EXP_19@12
+RAPI_EXP_20@4
+RAPI_EXP_21@8
+RAPI_EXP_22@8
+RAPI_EXP_23@12
+RapiFreeBuffer@4