Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CreateMutex
#1
I am trying to use CreateMutex(). If I use it without declaration
and use CreateMutex(null,TRUE,"Name").....thinking the kernel32.bi include will do the job.....I get an error that arg 1 is wrong type.

Q) Do I need to use a Declare Function CreateMutex lib "kernel32.dll" etc definition before I can use CreateMutex????

Regards

John
Reply
#2
null is not a predefined constant, so maybe that's the problem. Include crt.bi just to be sure it gets defined.
And FB 0.12 includes its own built-in threading functions that ensure portability, you're encouraged to use those instead of Win32 specific stuff. Have a look at examples/threads.bas and examples/mutex.bas.
ngelo Mottola - EC++
Reply
#3
Thanks for the reply, I will check everything when I come out of this internet shop.

I quickly scannewd the mutex.bas example but could not see how you would build (make) a mutex in the same way as CreateMutex()? Are you saying that example is using a wrapper for CreateMutex()???

Reagrds

John
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)