I think you are using this incorrectly.
You must call getlasterror before calling anything else that might set or
reset it. This has nothing to do with ST/MT
Paul
----- Original Message -----
From: "Xavi" <jara...@gmail.com>
To: "Harbour Project Main Developer List." <harbour@harbour-project.org>
Sent: Sunday, January 03, 2010 12:38 AM
Subject: [Harbour] To Admins: Harbour & Windows APIs.
testwmtx.prg is an example of why not work wapi_GetLastError() .-
--- testwmtx.prg
STATIC s_hMutex
PROCEDURE Main()
LOCAL cAppName
// It may be a random program name :)
hb_FNameSplit( hb_ProgName(), NIL, @cAppName )
s_hMutex := wapi_CreateMutex( NIL, NIL, cAppName )
IF ! Empty( s_hMutex ) .AND. wapi_GetLastError() == 0
? cAppName, "=> Hello World! OK."
ELSE
? cAppName, "=> Application is running. Error", wapi_GetLastError()
ENDIF
WAIT
RETURN
---
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour