windows - Calling PowerShell scripts from unmanaged C++ -


It appears that Microsoft seems to push too much configuration and query capabilities ahead of the PowerShell (accessible from C # or managed C ++), while neglecting and even removing old APIs (C or Unmanaged C ++) For those of us who have extensive unmanaged C ++ programs that can not switch to Managed C ++, they need to call PowerShell cmdlets (at least, I have one now) It's possible - how can we do this?

There are suggestions that reverse-pIynov (managed / unmanaged thumbing) might be able to do something, but I'm hoping better than thumping or parsing text output from PowerShell script.

[Note: This can be a recycled and generalized which can be very specific.]

MS suggestions might be to compile specific sections / modules in your normally unmanaged C ++ app (by compiling it with personal files / CRR), and by calling IJW transition code Manages calls from / to (and calling PowerShell API from managed bits) to me Or has (MS VC ++ and others) that are required method for adding bits of managing calls for large uncertified applications.

Hope that helps.


Comments