掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
構造体にChar型で正しく格納するには? (ID:20644)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Delphi5Pro, Delphi7Pro で試したのですが、 正しく値が格納されていました。 exe側 procedure TForm1.Button3Click(Sender: TObject); var Notes: TNotes; begin StrPLCopy(Notes.A ,'AA',Sizeof(Notes.A)); StrPLCopy(Notes.B ,'BB',Sizeof(Notes.B)); StrPLCopy(Notes.C ,'CC',Sizeof(Notes.C)); StrPLCopy(Notes.D ,'DD',Sizeof(Notes.D)); StrPLCopy(Notes.E ,'EE',Sizeof(Notes.E)); StrPLCopy(Notes.F ,'FF',Sizeof(Notes.F)); StrPLCopy(Notes.G ,'GG',Sizeof(Notes.G)); du_SendMail(Notes); end; dll側 function du_SendMail(var FNotes : TNotes): LongInt; stdcall; var S: String; begin S := 'A:' + FNotes.A + Chr($d) + Chr($a) + 'B:' + FNotes.B + Chr($d) + Chr($a) + 'C:' + FNotes.C + Chr($d) + Chr($a) + 'D:' + FNotes.D + Chr($d) + Chr($a) + 'E:' + FNotes.E + Chr($d) + Chr($a) + 'F:' + FNotes.F + Chr($d) + Chr($a) + 'G:' + FNotes.G; MessageDlg(S, mtInformation, [mbOk], 0); Result := 0; end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.