|
@@ -8,7 +8,7 @@ UNIT RAPI;
|
|
|
|
|
|
INTERFACE
|
|
INTERFACE
|
|
|
|
|
|
-uses Windows;
|
|
|
|
|
|
+uses Windows, RAPITypes;
|
|
|
|
|
|
const
|
|
const
|
|
FAF_ATTRIBUTES = $00000001;
|
|
FAF_ATTRIBUTES = $00000001;
|
|
@@ -343,6 +343,8 @@ type
|
|
TCeFindAllFiles = function(Path: PWideChar; Attr: DWORD; var Count: DWord;
|
|
TCeFindAllFiles = function(Path: PWideChar; Attr: DWORD; var Count: DWord;
|
|
var FindData: PCe_Find_Data_array): BOOL stdcall;
|
|
var FindData: PCe_Find_Data_array): BOOL stdcall;
|
|
TRapiFreeBuffer = procedure(p: Pointer) stdcall;
|
|
TRapiFreeBuffer = procedure(p: Pointer) stdcall;
|
|
|
|
+ TCeRapiInvoke = function (pDllPath: LPCWSTR; pFunctionName: LPCWSTR; cbInput: DWord; pInput: PByte;
|
|
|
|
+ pcbOutput: PDWord; ppOutput: PPByte; ppIRAPIStream: PIRAPIStream; dwReserved: DWord): HResult; stdcall;
|
|
|
|
|
|
function CeRapiInit: LongInt;
|
|
function CeRapiInit: LongInt;
|
|
function CeRapiInitEx(var RInit: TRapiInit) : LongInt;
|
|
function CeRapiInitEx(var RInit: TRapiInit) : LongInt;
|
|
@@ -435,6 +437,8 @@ function CeGetSystemPowerStatusEx(pStatus: PSYSTEM_POWER_STATUS_EX; fUpdate: BOO
|
|
function DesktopToDevice(DesktopLocation, TableList: String; Sync: BOOL; Overwrite: Integer; DeviceLocation: String): Longint;
|
|
function DesktopToDevice(DesktopLocation, TableList: String; Sync: BOOL; Overwrite: Integer; DeviceLocation: String): Longint;
|
|
//added 01/19/2003 - Octavio Hernandez
|
|
//added 01/19/2003 - Octavio Hernandez
|
|
function DeviceToDesktop(DesktopLocation, TableList: String; Sync: BOOL; Overwrite: Integer; DeviceLocation: String): Longint;
|
|
function DeviceToDesktop(DesktopLocation, TableList: String; Sync: BOOL; Overwrite: Integer; DeviceLocation: String): Longint;
|
|
|
|
+function CeRapiInvoke(pDllPath: LPCWSTR; pFunctionName: LPCWSTR; cbInput: DWord; pInput: PByte;
|
|
|
|
+ pcbOutput: PDWord; ppOutput: PPByte; ppIRAPIStream: PIRAPIStream; dwReserved: DWord): HResult;
|
|
|
|
|
|
IMPLEMENTATION
|
|
IMPLEMENTATION
|
|
|
|
|
|
@@ -506,6 +510,7 @@ var
|
|
mDesktopToDevice: TDesktopToDevice;
|
|
mDesktopToDevice: TDesktopToDevice;
|
|
//added 01/19/2003 - Octavio Hernandez
|
|
//added 01/19/2003 - Octavio Hernandez
|
|
mDeviceToDesktop: TDeviceToDesktop;
|
|
mDeviceToDesktop: TDeviceToDesktop;
|
|
|
|
+ mCeRapiInvoke: TCeRapiInvoke;
|
|
|
|
|
|
RapiModule, AdoCEModule: THandle;
|
|
RapiModule, AdoCEModule: THandle;
|
|
|
|
|
|
@@ -588,6 +593,7 @@ begin
|
|
@mCeGetClassName:= GetProcAddress(RapiModule, 'CeGetClassName');
|
|
@mCeGetClassName:= GetProcAddress(RapiModule, 'CeGetClassName');
|
|
@mCeGlobalMemoryStatus:= GetProcAddress(RapiModule, 'CeGlobalMemoryStatus');
|
|
@mCeGlobalMemoryStatus:= GetProcAddress(RapiModule, 'CeGlobalMemoryStatus');
|
|
@mCeGetSystemPowerStatusEx:= GetProcAddress(RapiModule, 'CeGetSystemPowerStatusEx');
|
|
@mCeGetSystemPowerStatusEx:= GetProcAddress(RapiModule, 'CeGetSystemPowerStatusEx');
|
|
|
|
+ @mCeRapiInvoke:= GetProcAddress(RapiModule, 'CeRapiInvoke');
|
|
end
|
|
end
|
|
else
|
|
else
|
|
Result := False;
|
|
Result := False;
|
|
@@ -1493,6 +1499,21 @@ begin
|
|
Result := $FFFF;
|
|
Result := $FFFF;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function CeRapiInvoke(pDllPath: LPCWSTR; pFunctionName: LPCWSTR;
|
|
|
|
+ cbInput: DWord; pInput: PByte; pcbOutput: PDWord; ppOutput: PPByte;
|
|
|
|
+ ppIRAPIStream: PIRAPIStream; dwReserved: DWord): HResult;
|
|
|
|
+begin
|
|
|
|
+ if not RapiLoaded then begin
|
|
|
|
+ Result := $FFFF;
|
|
|
|
+ Exit;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ if @mCeRapiInvoke <> nil then
|
|
|
|
+ Result := mCeRapiInvoke(pDllPath, pFunctionName, cbInput, pInput, pcbOutput, ppOutput, ppIRAPIStream, dwReserved)
|
|
|
|
+ else
|
|
|
|
+ Result := $FFFF;
|
|
|
|
+end;
|
|
|
|
+
|
|
INITIALIZATION
|
|
INITIALIZATION
|
|
RapiModule := 0;
|
|
RapiModule := 0;
|
|
AdoCEModule := 0;
|
|
AdoCEModule := 0;
|