aboutsummaryrefslogtreecommitdiffstats
path: root/Modis/SDK/UPluginDefs.pas
diff options
context:
space:
mode:
authorwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-06 19:40:06 +0000
committerwhiteshark0 <whiteshark0@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-11-06 19:40:06 +0000
commita1a9c43dcd6f61610eb3afea542aec5de5dabf30 (patch)
tree8a52fcb122ea41d32a81f04cf365a1064be79fee /Modis/SDK/UPluginDefs.pas
parenteee3f173ec616e89dea23d4aa192e68587eea148 (diff)
downloadusdx-a1a9c43dcd6f61610eb3afea542aec5de5dabf30.tar.gz
usdx-a1a9c43dcd6f61610eb3afea542aec5de5dabf30.tar.xz
usdx-a1a9c43dcd6f61610eb3afea542aec5de5dabf30.zip
Some changes to PluginInterface to fit with 64 Bit Systems. lParam is maily for use as Pointer, therefore standardtype: Pointer. wParam should mainly be used for ordinals. (Integer or Int64 on 64Bit Systems).
Don't return addresses. Result is not assured to be Int64 on 64 Bit Systems. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@592 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Modis/SDK/UPluginDefs.pas')
-rw-r--r--Modis/SDK/UPluginDefs.pas25
1 files changed, 19 insertions, 6 deletions
diff --git a/Modis/SDK/UPluginDefs.pas b/Modis/SDK/UPluginDefs.pas
index f0a68fa9..68b35446 100644
--- a/Modis/SDK/UPluginDefs.pas
+++ b/Modis/SDK/UPluginDefs.pas
@@ -16,6 +16,17 @@ interface
type
DWORD = LongWord;
+ //Compatibility with 64 Bit Systems
+ {$IFDEF CPU32}
+ TwParam = Integer;
+ TlParam = Pointer; //lParam is Used for 32 Bit addresses DWord is large enough
+ {$ELSE}
+ TwParam = Int64;
+ TlParam = Pointer; //lParam used for 64Bit addresses in 64 Bit Systems(FreePascal)
+ {$ENDIF}
+ //wParam is mainly used for Ordninals
+ //lParam is mainly used for Pointers
+
//----------------
// TUS_PluginInfo - Some Infos from Plugin to Core.
// Send when Plugininfo procedure is Called
@@ -47,16 +58,16 @@ type
// In this Case the Caller of the Notifier gets the Return Value
// Return Value Should not be -1
//----------------
- TUS_Hook = Function (wParam, lParam: DWord): integer; stdcall;
- TUS_Hook_of_Object = Function (wParam, lParam: DWord): integer of Object;
+ TUS_Hook = Function (wParam: TwParam; lParam: TlParam): integer; stdcall;
+ TUS_Hook_of_Object = Function (wParam: TwParam; lParam: TlParam): integer of Object;
//----------------
// TUS_Service - Structure of the Service Function
// This Function is called if the Registered Service is Called
// Return Value Should not be SERVICE_NOT_FOUND
//----------------
- TUS_Service = Function (wParam, lParam: DWord): integer; stdcall;
- TUS_Service_of_Object = Function (wParam, lParam: DWord): integer of Object;
+ TUS_Service = Function (wParam: TwParam; lParam: TlParam): integer; stdcall;
+ TUS_Service_of_Object = Function (wParam: TwParam; lParam: TlParam): integer of Object;
//----------------
// TUS_PluginInterface - Structure that Includes all Methods callable
@@ -76,7 +87,7 @@ type
{Function start calling the Hook Chain
0 if Chain is called until the End, -1 if Event Handle is not valid
otherwise Return Value of the Hook that breaks the Chain}
- NotivyEventHooks: Function (hEvent: THandle; wParam, lParam: dWord): integer; stdcall;
+ NotivyEventHooks: Function (hEvent: THandle; wParam: TwParam; lParam: TlParam): integer; stdcall;
{Function Hooks an Event by Name.
Returns Hook Handle on Success, otherwise 0}
@@ -101,7 +112,7 @@ type
{Function Calls a Services Proc
Returns Services Return Value or SERVICE_NOT_FOUND on Failure}
- CallService: Function (ServiceName: PChar; wParam, lParam: dWord): integer; stdcall;
+ CallService: Function (ServiceName: PChar; wParam: TwParam; lParam: TlParam): integer; stdcall;
{Function Returns Non Zero if a Service with the given Name Exists,
otherwise 0}
@@ -151,12 +162,14 @@ const
CORE_SM_WARNING = 2;
CORE_SM_INFO = 3;
+
//----------------
// Some Functions to Handle Version DWords
//----------------
Function MakeVersion(const HeadRevision, SubVersion, SubVersion2: Byte; Letter: Char): DWord;
Function VersiontoSting(const Version: DWord): String;
+
implementation
//--------------