Powershell call succeeded

$code = @'
[DllImport("user32.dll", EntryPoint = "SendMessageW", CharSet = CharSet.Unicode)] public static extern IntPtr SendMessageS(IntPtr hWnd, int Msg, uint wParam, string lParam);
[DllImport("user32.dll", EntryPoint = "FindWindowW", CharSet = CharSet.Unicode)] public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
'@
$myAPI = Add-Type -MemberDefinition $code -Name API -PassThru
$myAPI::SendMessageS($myAPI::FindWindow("QM_Editor", "Quick Macros - Main - [func8]"), 12, 1, "Q ' M 'func8'");