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
>