PostMessage发送字符串返回接口字符怎么正常显示字符串
Declare integer PostMessage in win32api as F_PostMessage Long ,Long ,Long ,stringisec=STR(Seconds(),10,5)
F_PostMessage (thisform.HWnd,1024+22,LEN(isec),isec )
Procedure OnProgress
Lparameters tnHWnd,tnwMsg,tnwParam,tnLparam
? SYS(2600,tnLparam,tnwParam) &&这句显示乱码,要如何才能显示正确的字符串
?tnwParam,tnLparam
EndProc
/// 使用COPYDATASTRUCT来传递字符串
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public struct COPYDATASTRUCT
{
public IntPtr dwData;
public int cbData;
[MarshalAs(UnmanagedType.LPStr)]
public string lpData;
}
[此贴子已经被作者于2023-12-22 09:53编辑过]