用VB创建DLL

VB中创建的DLL只是COM组件,无法作为输出函数的DLL,其实这只是个错误的说法。VB编译文件实际上采取了两次编译的方法,首先是调用C2.exe产生*.OBJ文件,然后调用Link.EXE连接。如果在LINK的时候添加 EXPORT选项,实际上是可以输出函数的。但是,在VB的工程选项中将这些屏蔽了。而且过分的是:VB在Build完成后会将OBJ文件删除,这样就无法手动通过Link来创建我们需要的DLL了。

Read the rest of this entry »

Using PI SDK with Visual Basic 6.0

osi.jpg

PI SDK References for a VB Project
PISDK 1.3 Type Library
Main PI SDK dynamic link library (DLL) – primary library for PI SDK content
PI-SDK Dialogs Library
Contains standard PI SDK functions like tag search and connection handling
PISDKCommon 1.0 Type Library
Makes available some shared data structures, like “named values”
PITimeServer 1.1 Type Library
Parses time strings and correctly renders time in several useful forms
PISDKParse 1.1 Type Library
Handles parsing / interpreting of expressions for the PI SDK – including PI PE style filter and calculation expressions

Read the rest of this entry »

Using PI API with Visual Basic 6.0

osi.jpg

The PI API provides a common programmer interface to PI System information.

The API is two files: PIAPI32.DLL & PILOG32.DLL which are the foundation of PI networking and data functionality
PIAPI32.dll – contains all of the “C” language functions necessary for any of the PI clients (including PI ProcessBook & PI DataLink) or any of PI’s high speed interfaces to interact with PI: reading and writing data, buffering system, informational functions, etc.
PILOG32.dll – contains all of the “C” language functions necessary to connect to PI servers, logon with security, and create and interpret data packets.

Read the rest of this entry »