用delphi写了一个dll,在C#中调用时需要传一个结构体,但是总是不对
delphi中的结构体:TChar7=array[0..6]ofchar;TChar20=array[0..19]ofchar;TFrmPara=recordShadow...
delphi中的结构体:
TChar7 = array[0..6] of char;
TChar20 = array[0..19] of char;
TFrmPara = record
ShadowColor :TChar7;
ShadowExpand :Byte;
ShadowBorderWidth :Byte;
ShadowAlpha :Byte;
FrmBorderColor :TChar7;
FrmBorderWidth :Byte;
TitleString :TChar20;
TitleStrColor :TChar7;
CanStretch :Boolean;
IsRes :Boolean;
BtnWidth :Byte;
BtnHeight :Byte;
BtnSpace :Byte;
ToRightSpace :Byte;
ToTopSpace :Byte;
BtnColor :TChar7;
BtnBgColor :TChar7;
BtnBgCloseColor :TChar7;
TitleBgColor :TChar7;
TitleHeight :Byte;
end;
C#中的结构体:
C#代码:
运行结果: 展开
TChar7 = array[0..6] of char;
TChar20 = array[0..19] of char;
TFrmPara = record
ShadowColor :TChar7;
ShadowExpand :Byte;
ShadowBorderWidth :Byte;
ShadowAlpha :Byte;
FrmBorderColor :TChar7;
FrmBorderWidth :Byte;
TitleString :TChar20;
TitleStrColor :TChar7;
CanStretch :Boolean;
IsRes :Boolean;
BtnWidth :Byte;
BtnHeight :Byte;
BtnSpace :Byte;
ToRightSpace :Byte;
ToTopSpace :Byte;
BtnColor :TChar7;
BtnBgColor :TChar7;
BtnBgCloseColor :TChar7;
TitleBgColor :TChar7;
TitleHeight :Byte;
end;
C#中的结构体:
C#代码:
运行结果: 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询