高手们帮帮忙啊。
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天了。