NetTalk Central

Author Topic: Self Service 3.24 Global Mutex can return Access Denied  (Read 10853 times)

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Self Service 3.24 Global Mutex can return Access Denied
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Self Service 3.24 Global Mutex can return Access Denied
« Reply #1 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

Larry Sand

  • Full Member
  • ***
  • Posts: 101
    • View Profile
Re: Self Service 3.24 Global Mutex can return Access Denied
« Reply #2 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