about novell login

siclj 2000-01-06 02:47:00
下面这段程序在delphi1.0下编译通过,但在win32下运行结果错误,在win98 下结果
正确.改在delphi5.0下编译,运行时出错,说nwcall.dll已经损坏,调用错误.这是为什么?implementation
type
NWTimeStamp = record
Year: byte;
Month: byte;
Day: byte;
Hour: byte;
Minute: byte;
Second: byte;
DayOfWeek: byte;
end;

{Netware API's - require NWCALLS.DLL}
function NWGetConnectionInformation(Connection: word;
ConnectionNumber: word;
ObjectName: pchar;
var ObjectType: word;
var ObjectID: word;
var LoginTime: NWTimeStamp):word;
far; external 'h:\datadic\swaic\NWCALLS';
{ end of Netware API stuff }

function GetUserLogin: string;
var
ConnectionID: word;
ConnectionNumber: word;
RC: word;
Name: array[0..50] of Char;
ObjectType: word;
ObjectID: word;
LoginTime: NWTimeStamp;
begin
RC := NWGetConnectionInformation( ConnectionID,
ConnectionNumber,
Name,
ObjectType,
ObjectID,
LoginTime);

Result := StrPas(Name);
end;
{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
showmessage(GetUserLogin);
end;
...全文
218 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
siclj 2000-01-07
  • 打赏
  • 举报
回复
在delphi5.0下编译,运行时出错,说nwcall.dll已经损坏,调用错误.这应该是32位程序
调用16位dll出错,应该要一个转换程序,谁有这方面的例子吗?(lujun2000@shinwa.com.cn)
这段程序在delphi1.0下编译通过,但在win32下运行结果错误,在win98 下运行结果
正确.这又是为什么?
siclj 2000-01-07
  • 打赏
  • 举报
回复
thank you,I'll try!
kxy 2000-01-07
  • 打赏
  • 举报
回复
就在这个网站的Delphi开发文档就有相应的资料, 连接是:
http://www.midatech.com/csdn/Delphi/Document/thunk95.htm
祝你好运......
kxy 2000-01-06
  • 打赏
  • 举报
回复
procedure beVersion(var pbeVersion : TBEVersion); cdecl; external 'BLADEENC.DLL';

implementation 之前如上写
//这里不写
siclj 2000-01-06
  • 打赏
  • 举报
回复
[Error] UNIT1.PAS(37): Declaration of 'NWGetConnectionInformation' differs from previous declaration
kxy 2000-01-06
  • 打赏
  • 举报
回复
stdcall
siclj 2000-01-06
  • 打赏
  • 举报
回复
在delphi5 中我早已经把far 去掉了
kxy 2000-01-06
  • 打赏
  • 举报
回复
win32,win98下把far; external 'h:\datadic\swaic\NWCALLS';
改为 externl 'NWCALLS' ; stdcall;
注意,32位编程没有far 的概念,far只是向下兼容.
加入 stdcall;
不加绝对路径,会在window的搜索路径中查找nwcalls的dll,移植性好.
README.TXT NOTES ON MS-DOS VERSION 5.0 =========================== In this file the following topics are covered: 1. Introduction 2. Solving Setup Problems 2.1 Priam and Everex Hard Disks 2.2 SyQuest Removable Hard Disk 2.3 Bernoulli Drive 2.4 Disk Manager 2.5 SpeedStor and Volume Expansion 2.6 Novell Partitions 2.7 Vfeature Deluxe 2.8 Columbia Data Systems Device Driver 2.9 Incompatible Partition 2.10 WYSE Partitions 2.11 286 Accelerator Cards 2.12 Bernoulli Cache 2.13 AT&T 6300 Computers 2.14 LANtastic 2.15 Western Digital SCSI Hard-Disk Controllers 2.16 Change CONFIG.SYS File 2.17 Toshiba T1600 and a Hard RAM Disk 3. Installing MS-DOS 5.0 on OS/2 Systems 3.1 Installing MS-DOS 5.0 and OS/2 Dual-Boot Systems 3.2 Using the Uninstall Program on an OS/2 System 4. Solving Memory Problems 4.1 386MAX 4.2 All Computers Expanded-Memory Driver 4.3 Bus Master DMA Controller 4.4 HIMEM.SYS Location 4.5 INT15 Access to Extended Memory 4.6 Intel LIM Driver 4.7 Phoenix BIOS and HIMEM.SYS 4.8 QEMM 4.9 XMAEM.SYS and XMA2EM.SYS 5. Solving Problems with Windows 5.1 DOS Applications in Windows Enhanced Mode 5.2 EMM386.EXE Location 5.3 WINA20.386 File 5.4 Windows 3.0 Enhanced Debug Version 5.5 Windows 2.03 5.6 Windows/286 2.1 5.7 Windows 386 and the Upper Memory Area 6. Making Your Hardware Compatible with MS-DOS 5.0 6.1 101-key Keyboards and QBasic/MS-DOS Editor 6.2 Acer 1100/33 6.3 Adaptec Controller Boards 6.4 Amstrad Systems and KEYB.COM 6.5 Hardcard II 6.6 COMPAQ EXTDISK.SYS Driver 6.7 Corel System Drivers 6.8 External Disk Drives 6.9 Mice and MS-DOS Shell 6.10 NCR VGA BIOS 6.11 Olivetti Systems 6.12 Toshiba T3100SX 6.13 Western Digital VGA Card 6.14 Zenith Computers 7. Making Your Network Compatible with MS-DOS 5.0 7.1 3+Share 7.2 AT&T StarGROUP 7.3 DCA 10Net and Word5 7.4 DOS LAN Requester 7.5 I

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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