在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
//----------------------Delphi-------------------
procedure GetSqlData(ASource: PChar; ADest: PChar; ADestSize: Integer); stdcall;
var
S: string;
begin
if ASource = nil then Exit;
S := Format('%s 路过!',[ASource]);
Move(S[1], ADest^, Min(ADestSize, Length(S)+1));
end;{ GetSqlData }
exports
GetSqlData;
//----------------------C#-------------------
[DllImport(@"TempLib.dll")]
public static extern void GetSqlData(string ASource, StringBuilder ADest, int ADestSize);
private void button1_Click(object sender, EventArgs e)
{
StringBuilder vDest = new StringBuilder(1024);
GetSqlData("Zswang", vDest, 1024);
Text = vDest.ToString();
}
http://blog.csdn.net/zswang/article/details/1615264
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论