I just started using CsWin32 and one of the Win32 functions I want to use it GetWindowText which gets mapped to
I know how to work with the first and last parameter, but I don't know what to do with the one in the middle, the PWSTR lpString
. How do I create an instance of that? The source code for PWSTR looks like this (excerpt):
internal unsafe readonly partial struct PWSTR
: IEquatable<PWSTR>
{
// ...
internal PWSTR(char* value) => this.Value = value;
// ...
}
我想我必须这样做
PWSTR lpString = new PWSTR(<what to do here>);
但我不知道如何在C#中创建一个char*
或等价的代码?