Mail Archives: cygwin-developers/2000/02/17/11:05:28
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
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
--BOKacYhQ+x31HxR3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=p
Thu Feb 17 11:09:51 2000 Christopher Faylor <cgf AT cygnus DOT 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 AT 4
+CeCloseHandle AT 4
+CeCopyFile AT 12
+CeCreateDatabase AT 16
+CeCreateDirectory AT 8
+CeCreateFile AT 28
+CeCreateProcess AT 40
+CeDeleteDatabase AT 4
+CeDeleteFile AT 4
+CeDeleteRecord AT 8
+CeFindAllDatabases AT 16
+CeFindAllFiles AT 16
+CeFindClose AT 4
+CeFindFirstDatabase AT 4
+CeFindFirstFile AT 8
+CeFindNextDatabase AT 4
+CeFindNextFile AT 8
+CeGetClassName AT 12
+CeGetDesktopDeviceCaps AT 4
+CeGetFileAttributes AT 4
+CeGetFileSize AT 8
+CeGetFileTime AT 16
+CeGetLastError AT 0
+CeGetSpecialFolderPath AT 12
+CeGetStoreInformation AT 4
+CeGetSystemInfo AT 4
+CeGetSystemMetrics AT 4
+CeGetSystemPowerStatusEx AT 8
+CeGetTempPath AT 8
+CeGetVersionEx AT 4
+CeGetWindow AT 8
+CeGetWindowLong AT 8
+CeGetWindowText AT 12
+CeGlobalMemoryStatus AT 4
+CeMoveFile AT 8
+CeOidGetInfo AT 8
+CeOpenDatabase AT 20
+CeRapiFreeBuffer AT 4
+CeRapiGetError AT 0
+CeRapiInit AT 0
+CeRapiInitEx AT 4
+CeRapiInvoke AT 32
+CeRapiUninit AT 0
+CeReadFile AT 20
+CeReadRecordProps AT 24
+CeRegCloseKey AT 4
+CeRegCreateKeyEx AT 36
+CeRegDeleteKey AT 8
+CeRegDeleteValue AT 8
+CeRegEnumKeyEx AT 32
+CeRegEnumValue AT 32
+CeRegOpenKeyEx AT 20
+CeRegQueryInfoKey AT 48
+CeRegQueryValueEx AT 24
+CeRegSetValueEx AT 24
+CeRemoveDirectory AT 4
+CeSHCreateShortcut AT 8
+CeSHGetShortcutTarget AT 12
+CeSeekDatabase AT 16
+CeSetDatabaseInfo AT 8
+CeSetEndOfFile AT 4
+CeSetFileAttributes AT 8
+CeSetFilePointer AT 16
+CeSetFileTime AT 16
+CeWriteFile AT 20
+CeWriteRecordProps AT 16
+GetRapiError AT 0
+RAPI_EXP_10 AT 4
+RAPI_EXP_11 AT 8
+RAPI_EXP_12 AT 4
+RAPI_EXP_13 AT 0
+RAPI_EXP_14 AT 4
+RAPI_EXP_15 AT 4
+RAPI_EXP_16 AT 0
+RAPI_EXP_17 AT 8
+RAPI_EXP_18 AT 8
+RAPI_EXP_19 AT 12
+RAPI_EXP_20 AT 4
+RAPI_EXP_21 AT 8
+RAPI_EXP_22 AT 8
+RAPI_EXP_23 AT 12
+RapiFreeBuffer AT 4
--BOKacYhQ+x31HxR3--
- Raw text -