![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Guest | Accessing System 32 and COM API's for Vista thru Powershell Hi, I'm new to Powershell and so far its been geat..as long as i didn't stray too far from .Net and WMI stuff. Now i'm to the point where i'm looking at possibly converting some of the specific use things I've done in C++ for Vista to use them in Powershell. I did these things based upon the new API's present in Vista like here: http://msdn2.microsoft.com/en-us/library/bb776780.aspx Yeah, I understand that API's aren't intended for direct admin interaction whereas cmdlets are, but if its possible to access some of this stuff i'd like to be able to do it. So I guess my question would be, how can i access these Vista API's and use them in Powershell? I've spent the last week browsing thru the various sites and blogs looking for things that are helpful, found a lot of stuff that was "almost but not really" things, and I have the concept of objects in Powershell down to a pretty reliable and comfortable level for me at least but I always stall out when trying to get to these API's, I know where i'm at, where i want to go, but just a "can't get there from here" thing is stalling my progess. Like for example, how would i access the Vista API IFileDialog interface and its members..or...any of the new functions like PathCreateFromUrlAlloc, Any examples or help would be great if anyone has any ideas on the subject. Thanks |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Accessing System 32 and COM API's for Vista thru Powershell If you want to run in-line C# code in PowerShell, search this group for "Re: Invisible Windows" (by Bruce Payette) its from the 8/15/2007. Another example, though from the early days of PowerShell (Monad), shows how to embed C# code to invoke a Win32API. Read the comments also. http://blogs.msdn.com/powershell/arc...25/583236.aspx ----- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic Quote: > Hi, > > I'm new to Powershell and so far its been geat..as long as i didn't > stray too far from .Net and WMI stuff. > > Now i'm to the point where i'm looking at possibly converting some of > the specific use things I've done in C++ for Vista to use them in > Powershell. I did these things based upon the new API's present in > Vista like here: > http://msdn2.microsoft.com/en-us/library/bb776780.aspx > > Yeah, I understand that API's aren't intended for direct admin > interaction whereas cmdlets are, but if its possible to access some of > this stuff i'd like to be able to do it. So I guess my question would > be, how can i access these Vista API's and use them in Powershell? > > I've spent the last week browsing thru the various sites and blogs > looking for things that are helpful, found a lot of stuff that was > "almost but not really" things, and I have the concept of objects in > Powershell down to a pretty reliable and comfortable level for me at > least but I always stall out when trying to get to these API's, I know > where i'm at, where i want to go, but just a "can't get there from > here" thing is stalling my progess. > > Like for example, how would i access the Vista API IFileDialog > interface and its members..or...any of the new functions like > PathCreateFromUrlAlloc, > > Any examples or help would be great if anyone has any ideas on the > subject. > > Thanks > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: Accessing System 32 and COM API's for Vista thru Powershell Thanks for the respons Shay, Couldn't find the group post you referenced but i did look at the link you provided. Its very interesting, i'm going to give it a go. Thanks ![]() "Shay Levi" wrote: Quote: > > If you want to run in-line C# code in PowerShell, search this group for > "Re: Invisible Windows" (by Bruce Payette) its from the 8/15/2007. > > Another example, though from the early days of PowerShell (Monad), > shows how to embed C# code to invoke a Win32API. Read the comments also. > http://blogs.msdn.com/powershell/arc...25/583236.aspx > > > ----- > Shay Levi > $cript Fanatic > http://scriptolog.blogspot.com > Hebrew weblog: http://blogs.microsoft.co.il/blogs/scriptfanatic > > > Quote: > > Hi, > > > > I'm new to Powershell and so far its been geat..as long as i didn't > > stray too far from .Net and WMI stuff. > > > > Now i'm to the point where i'm looking at possibly converting some of > > the specific use things I've done in C++ for Vista to use them in > > Powershell. I did these things based upon the new API's present in > > Vista like here: > > http://msdn2.microsoft.com/en-us/library/bb776780.aspx > > > > Yeah, I understand that API's aren't intended for direct admin > > interaction whereas cmdlets are, but if its possible to access some of > > this stuff i'd like to be able to do it. So I guess my question would > > be, how can i access these Vista API's and use them in Powershell? > > > > I've spent the last week browsing thru the various sites and blogs > > looking for things that are helpful, found a lot of stuff that was > > "almost but not really" things, and I have the concept of objects in > > Powershell down to a pretty reliable and comfortable level for me at > > least but I always stall out when trying to get to these API's, I know > > where i'm at, where i want to go, but just a "can't get there from > > here" thing is stalling my progess. > > > > Like for example, how would i access the Vista API IFileDialog > > interface and its members..or...any of the new functions like > > PathCreateFromUrlAlloc, > > > > Any examples or help would be great if anyone has any ideas on the > > subject. > > > > Thanks > > > > |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: Accessing System 32 and COM API's for Vista thru Powershell Spooky wrote: Quote: > Thanks for the respons Shay, > > Couldn't find the group post you referenced but i did look at the link you > provided. Its very interesting, i'm going to give it a go. > > Thanks ![]() -- Microsoft MVP - Windows PowerShell http://www.microsoft.com/mvp PowerGadgets MVP http://www.powergadgets.com/mvp Blog: http://marcoshaw.blogspot.com |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Accessing powershell cmdlet via rsh | PowerShell | |||
| Accessing Exchange 5.5 hidden recipients with PowerShell ADSI | PowerShell | |||
| [ann] another way to call api's from script (the PB way) | VB Script | |||
| Win32 API's in Powershell - FindWindow and SendMessage | PowerShell | |||
| Accessing the Environemnt from PowerShell | PowerShell | |||