Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CreateMutex function #952

Closed
IvanRF opened this issue Apr 23, 2018 · 3 comments
Closed

Add CreateMutex function #952

IvanRF opened this issue Apr 23, 2018 · 3 comments

Comments

@IvanRF
Copy link
Contributor

IvanRF commented Apr 23, 2018

This function is useful/needed to detect if an application is still running in any logged Windows user.

For example, Inno Setup depends on it for [Setup]: AppMutex. This directive is used to prevent the user from installing new versions of an application while the application is still running, and to prevent the user from uninstalling a running application.

CreateMutex function: https://msdn.microsoft.com/en-us/library/ms682411.aspx

Syntax

HANDLE WINAPI CreateMutex(
  _In_opt_ LPSECURITY_ATTRIBUTES lpMutexAttributes,
  _In_     BOOL                  bInitialOwner,
  _In_opt_ LPCTSTR               lpName
);

Related:

Similar function already in JNA:

@matthiasblaesing
Copy link
Member

@IvanRF please have a look at PR #971 I think that should do what you require.

@IvanRF
Copy link
Contributor Author

IvanRF commented Jun 3, 2018

@matthiasblaesing Yes, excellent work! Thanks for implementing it 👍

@ymalli144
Copy link

Is there any equivalent method for createevent() to use for Linux in JNA?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants