Paul,

Please, read this thread about the topic.

http://lists.harbour-project.org/pipermail/harbour/2009-December/029562.html

--
Xavi

El 03/01/2010 14:44, Paul Tucker escribió:
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


_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to