其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
Translating lotus API Data Types to LotusScript

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

lotus API Data Type LotusScript Data Type
char, char* ByVal String
char far* ByVal String
int Long (4-byte value)
long Long
WORD, SWORD Integer
DWORD Long
INT, UINT Integer
SHORT, USHORT Integer
LONG, ULONG Long
NUMBER Double
BOOL Long (in general,
sometimes Integer)
BYTE, BOOLBYTE Byte in R5+,
cannot convert pre-R5
STATUS Integer
HANDLE Long (Integer on Mac
and some UNIX)
HMODULE Long
NULL ByVal Integer (0)

In general, when you have a pointer (*) to a variable, you'll want to pass that parameter ByRef, otherwise you should pass it ByVal -- the exceptions are Strings (which you should pretty much always pass ByVal) and user-defined data types (which you have to pass ByRef). If you want to pass a NULL value to an API function, declare the parameter as an Integer and pass a zero ByVal.

As an example, these two commonly-used API functions:

STATUS LNPUBLIC NSFDbOpen(char far *PathName, DBHANDLE far *rethDB);
STATUS LNPUBLIC NSFDbClose(DBHANDLE hDB);

are defined like this in LotusScript (on a Windows platform):

Declare Function NSFDbOpen Lib "nnotes.dll" (Byval PathName As String, _
rethDB As Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer

Note that the function's return value (STATUS, in this case) is at the beginning of the function declaration in C, and the LNPUBLIC part of the function gets thrown away (that's just the calling convention in C, and has nothing to do with your LotusScript calls). If a C function returns "void", you can treat it like a Sub.
来自nsftool




相关文章

相关软件