首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

请朋友帮帮忙,这段C代码怎么改成DELPHI的?多谢

2012-03-08 
请朋友帮帮忙,这段C代码如何改成DELPHI的?谢谢!static char szAction[100]void Action(int index){memset

请朋友帮帮忙,这段C代码如何改成DELPHI的?谢谢!
static char szAction[100];
void Action(int index)
{
  memset(szAction, 0, sizeof(szAction));

  index = index > Contract? Contract : index < AddSP? AddSP: index;

  strcpy(szAction, szActionList[index]);


  __asm{
  pushad


  mov ebx, 0x754ea4
  mov ecx, dword ptr ds:[ebx]

  push offset szAction

  mov ebx, 0x430FD0
  call ebx

  popad
  }
}

请朋友帮帮忙,这段C代码如何改成DELPHI的?谢谢!

[解决办法]
var
Form1: TForm1;
szAction:string[100];
implementation

{$R *.dfm}
procedure action(index:integer);
begin
szaction:='';
if index>contract then
index:=contract
else if index<AddSP then
index:=AddSP
else index:=index;
saaction:=szactionlist[index];
ASM
pushad
mov ebx, 0x754ea4
mov ecx, dword ptr ds:[ebx]
push offset szAction
mov ebx, 0x430FD0
call ebx
popad
END;

end;

热点排行