Re: LSA vs LSP GUI on Vista/2008?

Hello Gerry

Am I correct in thinking the ONLY way to programatically obtain the
LSA privs information is using C/C++ with the Windows API? No way
to use COM, .NET or WMI?

You can call the native API in .NET using P/Invoke. Here is an example:

As far as I know, there is no built-in WMI class or COM object to list LSA
privs (I will double confirm it with the product group and will let you
know if I was wrong). However, it's not difficult to write such a COM
object by ourselves. If your business context allows writing and using your
own COM object, please refer to this sample:
It has a sample named ATLActiveXDll, which is an in-process COM server
written in ATL. In the Readme.txt file of the sample, you can find the
detailed steps to build such a COM object. I hope that it can help you
quickly ramp up the knowledge of COM.

Best Regards,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:

This posting is provided "AS IS" with no warranties, and confers no rights.


Relevant Pages

  • Re: WMI and MAX_PATH limitation?
    ... I'm not pleased with the work-around suggested because it effectively means WMI can not be used for file names greater than 260 characters, and in modern business this is very common. ... WMI is supposed to help us carry out common tasks without using the Windows API. ... The WMI provider should be designed to call the latest Microsoft APIs. ... does not support file names greater than 260. ...
  • Re: Newbie question
    ... Many python modules don't actually do anything than passing on calls to an ... They are cheap to make, ... Extensions or use the Windows API to monitor directory changes. ... WMI is an implementation of the WBEM standards. ...
  • Re: Setting System Time without API
    ... ;-) I thought the question was simple enough, how to change time without using the Windows API and expected either: No, can't be done or Here's how. ... you're using what is essentially a Windows features (WMI). ...
  • Re: Convert Win32_SecurityDescriptor to a SECURITY_DESCRIPTOR
    ... methods to create network shares. ... If we don't use WMI, we then have to go to windows API. ... I have a system here for creating shares and working with NTFS permissions, ...
  • Re: LSA vs LSP GUI on Vista/2008?
    ... LSA privs information is using C/C++ with the Windows API? ... .NET or WMI? ... and it goes against the whole philosophy of "Managed" code. ... I've reported bugs in ATL and received no help, and I don't see a roadmap for ATL/COM in the most recent SDKs... ...