Browse Source

* Patch to fix createevent call on wince if the last param
is nil. (last param contains security settings not available on wince?). Patch
by Fabio, Mantis #20280

git-svn-id: trunk@19138 -

marco 14 years ago
parent
commit
e343e6263b
1 changed files with 6 additions and 2 deletions
  1. 6 2
      rtl/wince/system.pp

+ 6 - 2
rtl/wince/system.pp

@@ -506,8 +506,12 @@ function CreateEvent(lpEventAttributes:pointer;bManualReset:longbool;bInitialSta
 var
 var
   buf: array[0..MaxPathLen] of WideChar;
   buf: array[0..MaxPathLen] of WideChar;
 begin
 begin
-  AnsiToWideBuf(lpName, -1, buf, SizeOf(buf));
-  CreateEvent := CreateEventW(lpEventAttributes, bManualReset, bInitialState, buf);
+  if lpName=nil then
+    CreateEvent := CreateEventW(lpEventAttributes, bManualReset, bInitialState, nil)
+  else begin
+    AnsiToWideBuf(lpName, -1, buf, SizeOf(buf));
+    CreateEvent := CreateEventW(lpEventAttributes, bManualReset, bInitialState, buf);
+  end;
 end;
 end;
 
 
 function EventModify(h: THandle; func: DWORD): LONGBOOL;
 function EventModify(h: THandle; func: DWORD): LONGBOOL;