There are many scenarios where it would be useful to call the Win32 function or some other DLL from the PowerShell script. to Define the following function signature:
bool MyFunction( char* buffer, int* bufferSize )
I heard that there is something that makes this easier in PowerShell CTP 2, but I'm curious how best to do this in PowerShell 1.0 . The fact that the function to be called uses pointers can influence the decision (I don't know yet).
So the question is, what is the best way to write a PowerShell script that can call an exported Win32 function like the one above?
Remember PowerShell 1.0.
source share