Desktop Functions: Smart Device Functions:
|
Search Results for "CreateMutex" in [All]coredll1: CreateMutex
public static extern int CreateMutex(IntPtr lpMutexAttributes, bool bInitiaOwner, string lpName);
CreateMutex(IntPtr.Zero, true, "<Application Name>"); // to be replaced by the name of your application kernel322: CreateMutex
static extern IntPtr CreateMutex(IntPtr lpMutexAttributes, bool bInitialOwner,
Public Function CreateMutex(ByVal lpMutexAttributes As IntPtr, _ Here's how I use CreateMutex() to prevent more than one instance of my application from running at any given time.
public static extern IntPtr CreateMutex( IntPtr lpMutexAttributes,
/// This value can be returned by CreateMutex() and is found in
// create IntPtrs for use with CreateMutex()
ipHMutex = Win32Calls.CreateMutex( ipMutexAttr,
{ // CreateMutex() failed.
/// This value can be returned by CreateMutex() and is found in
public static extern IntPtr CreateMutex(IntPtr lpMutexAttributes, bool bInitialOwner, string lpName);
mutex.Handle = InternalCreateMutex( initiallyOwned, name, out createdNew );
private static IntPtr InternalCreateMutex( bool initiallyOwned, string name, out bool createdNew )
hMutex = Native.CreateMutex( mutexAttributesPtr, initiallyOwned ? true : false, name ); |