Re: [fpc-pascal] Does GetLastError in WinCE work? NO answer??

2009-11-02 Thread epergola

Is this the wrong forum?

Can anybody help with my question? If I should send it to another forum,
please
tell me which one.
Thanks


epergola wrote:
> 
> Hello
> I get strange results form GetLasError in WinCe;
> something like 1449435930, for example;
> 
> I use this:
> {$include d:\lazarus\fpc\2.2.4\source\rtl\wince\wininc\coredll.inc} 
> function GetLastError:DWORD; external KernelDLL name 'GetLastError'; 
> 
> var
>  err: dword;
> 
> begin
> MutexHandle := CreateMutex(NIL, TRUE, 'xxx');
> err:= GetCeError;
> if err = ERROR_ALREADY_EXISTS  THEN BEGIN
>   SetForegroundWindow(FindWindow('xxx', ''));
>   CloseHandle(MutexHandle);
>   Application.BringToFront;
> END ELSE BEGIN
>   .
> Am I missing something? 
> Why do I get those huge values from GetLastError?
> Thanks for any help
> 

-- 
View this message in context: 
http://old.nabble.com/Does-GetLastError-in-WinCE-work--tp26124267p26157812.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Does GetLastError in WinCE work?

2009-10-29 Thread epergola

Hello
I get strange results form GetLasError in WinCe;
something like 1449435930, for example;

I use this:
{$include d:\lazarus\fpc\2.2.4\source\rtl\wince\wininc\coredll.inc} 
function GetLastError:DWORD; external KernelDLL name 'GetLastError'; 

var
 err: dword;

begin
MutexHandle := CreateMutex(NIL, TRUE, 'xxx');
err:= GetCeError;
if err = ERROR_ALREADY_EXISTS  THEN BEGIN
  SetForegroundWindow(FindWindow('xxx', ''));
  CloseHandle(MutexHandle);
  Application.BringToFront;
END ELSE BEGIN
  .
Am I missing something? 
Why do I get those huge values from GetLastError?
Thanks for any help
-- 
View this message in context: 
http://old.nabble.com/Does-GetLastError-in-WinCE-work--tp26124267p26124267.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal