NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Larry Sand on November 07, 2013, 08:26:43 AM

Title: Self Service 3.24 Global Mutex can return Access Denied
Post by: Larry Sand on November 07, 2013, 08:26:43 AM
Hi Bruce,

When checking the error returned creating a second global mutex i found that Windows will also return Access Denied "ErrNum = 5".  So the test in MyService.ManageInstances() needs something like this:

ErrorNum = ERROR_ALREADY_EXISTS Or Choose(self.TerminalServiceUsesGlobalMutex <> 0 And ErrorNum = 5)

Larry Sand
Title: Re: Self Service 3.24 Global Mutex can return Access Denied
Post by: Bruce on November 07, 2013, 10:12:09 PM
So, if I'm reading this correctly, you're saying that NewMutex can return an Access Denied Error (5).
so the line

elsif ErrorNum = ERROR_ALREADY_EXISTS

should become

elsif ErrorNum = ERROR_ALREADY_EXISTS or  ErrorNum = 5

I'm happy with that, but your construction with Choose doesn't look right. Can you confirm what's going on there?

cheers
Bruce
Title: Re: Self Service 3.24 Global Mutex can return Access Denied
Post by: Larry Sand on November 08, 2013, 07:52:25 AM
Bruce,
>>I'm happy with that, but your construction with Choose doesn't look right. Can you confirm what's going on there?


You mean the syntax or what my poor feeble mind was thinking? <g>  At the time I thought I would only test if the global option was enabled.  I suppose that if it returns access denied on the create then it more than likely already exists.  That was all.

Thanks,
Larry Sand