You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current the "Connect" method uses a fixed value of "windows.SC_MANAGER_ALL_ACCESS" when calling "windows.OpenSCManager". Similarly, the "OpenService" method uses a fixed value of "windows.SERVICE_ALL_ACCESS" when calling "windows.OpenService".
This proposal adds "ConnectWithPermissions" and "OpenServiceWithPermissions". These would both take an additional "uint32" value that is simply passed through to the underlying windows methods. The existing methods would delegate to these new methods passing the existing permissions values.
And please add documentation strings for new APIs that everyone will see.
In the PR sure. I didn't want to do it here in the comment as it got in the way what I was trying to communicate. The purpose here was a proposal for additions to the interface and to get that approved before working up a PR.
But I suggest you adjust your proposal to add just...
I did it the way I did simply because it was the simplest way of implementing it, it was the way it falls out most naturally. As it stands, all of the implementation is within ConnectRemote. To preserve that and avoid code duplication or a bigger refactor, you need to just add a permissions argument to that function. Whilst I don't personally need to to "ConnectRemoteWithPermissions" I can see how you might want to, so it seemed unnecessary to artificially not have that option. Also, ConnectWithPermissions where I need to pass "" if I want to connect to the local system seems unnecessarily obscure (not obvious that's what you need to do). For the sake of adding an extra delegation function, you got a clearer interface. So for me, the suite of functions presented represented the best option. But if you want just the single function, that's fine.
Proposal Details
Current the "Connect" method uses a fixed value of "windows.SC_MANAGER_ALL_ACCESS" when calling "windows.OpenSCManager". Similarly, the "OpenService" method uses a fixed value of "windows.SERVICE_ALL_ACCESS" when calling "windows.OpenService".
This proposal adds "ConnectWithPermissions" and "OpenServiceWithPermissions". These would both take an additional "uint32" value that is simply passed through to the underlying windows methods. The existing methods would delegate to these new methods passing the existing permissions values.
So you would have:
Then
The text was updated successfully, but these errors were encountered: