高手们帮帮忙啊。

spring_mhm 2008-11-13 04:00:32
C#代码
examProj1.examClass dd = new examClass();
dd.UserLogin("张旭", "zx", "4", "192.168.1.29");

Delphi代码
procedure Texam.UserLogin(const UserID, UserPwd, Style,
ServerIP: WideString);
begin
if clsDB.GetDBConn(ServerIP) then
begin

if auPwdOK1(UserID,UserPwd,Style) then
begin
if Style='1' then
begin
Main:=TMain.Create(Self);
Main.Parent:=nil;
Main.Visible:=True;
Screen.Cursor:=crDefault;
userlimit:='zh';
end;
if Style='2' then
begin
Main1:=TMain1.Create(Self);
Main1.Parent:=nil;
Main1.Visible:=True;
Screen.Cursor:=crDefault;
userlimit:='zj';
end;
if Style='4' then
begin
Main2:=TMain2.Create(Self);
Main2.Parent:=nil;
Main2.Visible:=True;
Screen.Cursor:=crDefault;
userlimit:='sj';
end;
end;

end;
end;

用Tlbimp转换后的DLL 方法
public virtual void UserLogin(string UserID, string UserPwd, string Style, string ServerIP)
examProj1.examClass 的成员


调用的时候报 AccessViolationException 尝试读取或写入受保护的内存。这通常指示其他内存已损坏。
关键是.net2003能调用,2005就不行。 用脚本调用也可以。。。
请各位高手帮帮我吧,我郁闷3天了。
...全文
49 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
nealwike 2008-11-14
  • 打赏
  • 举报
回复
路过..

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧