Windows Platform SDK can we use it in .Net ? How do interact with Windows OS

Hi can we use the Windows O/S SDK  

eg I want to be able to interop with the o/s code in my apps. 

I want to able to do things like Shutdown the pc or restart it. Log the current user off and everything else that is native to windows o/s. 

Will i have to execute shell commands from my .net app etc. 

Please help 


Answer this question

Windows Platform SDK can we use it in .Net ? How do interact with Windows OS

  • Amitoj

    much of the windows api functionality is included in the .NET framework.  If there is some win api function you want to call you set it up like this...excluding the <>

    [DllImport(<"dllname.dll">)]
    static extern <returntype> MethodName(<arguements>);

    also there are programs you can execute using the shell commands...

    I dont know the specifics of shutting down,restarting,logging off etc...but if you know the win api function to do it that is how you would do it...search for DllImport on google

  • Windows Platform SDK can we use it in .Net ? How do interact with Windows OS