Download Winisis 1 - CIDBIMENA

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Entity–attribute–value model wikipedia , lookup

Serializability wikipedia , lookup

Open Database Connectivity wikipedia , lookup

IMDb wikipedia , lookup

Oracle Database wikipedia , lookup

DBase wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Ingres (database) wikipedia , lookup

Functional Database Model wikipedia , lookup

Database wikipedia , lookup

Concurrency control wikipedia , lookup

Relational model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
Winisis 1.4
Exported Functions for Plugins - 23 January, 2001
Calling parameters
The plug-in program automatically receives the following command line parameters:
Int32 FrameID
Winisis identifier
Char* WorkfilePath
Winisis path for workfiles. For example:
“c:\winisis\work”
Int32 WinisisVersion
Winisis version number: major (1 digit) minor (2
digits) build (2 digits). For example: 14018
Int32 EditControlHWND
(optional)
When plug-in is called from specific controls or
windows (such as “CHOICE:call::” during Data
Entry), this parameter contains the HWND of the
calling control.
Main Functions

pluginID WinisisRegister(WinisisFrameID, pluginWinHandle, pluginName,
type, reserved)
This function asks Winisis to register the plugin. An atom is created to pass to Winisis the
information contained in the following structure:
struct WinisisREGISTERINFO {
frameID;
Plugin name;
Type;
Reserved (not used);
}
The "dllversion" parameter allows to avoid conflicts between different versions of the
pluginDLL. The DLL will automatically check for incompatibilities. For instance, if DLL
version 3 does not support version 1 commands, it returns a plugin registration error. But
eventually version 4 does support version 1 commands and proceeds with the registration
successfully. The following are the implemented registration error codes:
WINISIS_REGERR_NOTSUPPORTED
WINISIS_REGERR_TOOMANYPLUGINS
WINISIS_REGERR_ERROR
WINISIS_REGERR_SINGLEINSTANCE

void WinisisRevoke()
This function removes the plugin from Winisis. The plugin then stops receiving Winisis
messages and won't be able to communicate to Winisis without re-registering.

int WinisisGetPlugInVal(int code);
Retrieve a plugin environment value such as: the plugin ID number, the Winisis ID
number, the Winisis version, the DLL plugin version etc etc. Implemented codes are:
WINISIS_PLUGINID
WINISIS_ID
WINISIS_VERSION
WINISIS_PLUGINDLL_VERSION

Void WinisisPluginDebug(int level)
Set DLL's internal debug status. The following levels are available:
WINISIS_DEBUG_NONE
WINISIS_DEBUG_FULL
General functions

dbaseID WinisisGetCurrentDBaseID()
Returns the ID of the current database window.
void WinisisLinkDBase(dbaseID)
This function informs Winisis that the plugin identifies itself with a particular database.
Under development

dbaseID WinisisEnumOpenDBase(dbaseID)
This function retrieves one by one the identifier of all opened database in the Winisis
frame. First call the Enum function using parameter 0; then call it again with the returned
dbaseID value until it returns 0.

void WinisisClose(databaseID)
This function will close the specified database.

yesno WinisisOpen(databasename)
Open a given database

yesno WinisisSelect(databaseID)
Select a given database which must already be open: for example
Var dbaseID: Integer;
dbaseID := WinisisGetCurrentDBaseID();
r := WinisisSelect(dbaseID);

num WinisisGetSearchCount()
Ask Winisis how many searches are stored in the search history.

void WinisisExit()
Ask Winisis to close itself. The result cannot be guaranteed.

void WinisisExecMenu(menu code)
Execute any menu option, given its code.
SYSPAR Functions

void WinisisGetParameter(number, char* buffer, int buffersize)
Retrieve a given parameter from Winisis' Syspar configuration file.
void WinisisSetParameter(number, char* buffer)
Set a parameter of Winisis' Syspar configuration file. This change is temporary and will be
lost unless the Syspar is saved afterwards.
void WinisisSaveSyspar()
Rewrite the Syspar configuration file with current values.
void WinisisReloadSyspar()
Force Winisis to reload the Syspar (note that some parameter changes won't be
considered before restarting the program).
Functions applicable to a database (they all need a database ID number)

ok
WinisisGetDBaseInfo(dbaseID, WinisisDBASESTRUCT area)
Returns the basic information of database dbaseID. The area will be filled as follows:
struct WinisisDBASEINFO {
dbaseID;
// window number of database
dbaseName[256];
currentMFN;
browseSearch; // 0=no; otherwise contains the query ID
formatName[32];
// current format name
numberOfFields;
}
Note: The "formatName" field could be invalid if browseSearch is different than zero.

ok
WinisisGetDBaseStruct(dbaseID, WinisisDBASESTRUCT area, areasize)
Returns the structure of database dbaseID. The area must be large enough to contain
all database fields (the number of fields can be retrieved using function
WinisisGetDBaseInfo()
struct WinisisDBASESTRUCT {
name[30]
subfields[20]
tag
type
repeatable
len
}

MFN WinisisGetControlRec(dbaseID, WinisisCONTROLRECORD)
Retrieve the database's control record which provides the following information:
Struct WinisisCONTROLRECORD
long
ctlmfn;
long
nxtmfn;
long
nxtmfb;
long
nxtmfp;
long
mftype;
long
reccnt;
long
mfcxx1;
long
mfcxx2;
long
mfcxx3;
}
{
// always 0
// MaxMFN+1
//
// n. of data entry locks
// database lock status

MFN WinisisGetCurrentMFN(dbaseID)
Retrieve the current MFN for the given database window.

NSearch WinisisSearch(dbaseID, exp)
Ask Winisis to execute a given search expression in the given database. Returns the
Winisis search history number. A negative return value indicates errors. Example:
r = WinisisSearch(dbase, "water + plants");

NResult WinisisSearchResults(dbaseID, Nsearch, struct SEARCHSTRUCT)
Stores all information about search number Nsearch in the following structure (if
provided):
struct {
long searchN; // number of search
long hits;
long recs;
long segs;
char expr[WINISIS_SEARCHEXP_LENG+1];
} WinisisSEARCHSTRUCT;
Returns the number of results (records). Example:
WinisisSEARCHSTRUCT mysearchstruct;
n = WinisisSearchResults(dbase, 1, 0);
n = WinisisSearchResults(dbase, 1, &mysearchstruct);

MFN WinisisSearchResult(dbaseID, Nsearch, n)
Returns the MFN of the n result in a given search set. For example to return the first
retrieved record of search srch:
mfn = WinisisSearchResult(dbaseID, srch, 1);
To get faster performances, you may ask to retrieve the previous or the next result using
the WINISIS_PREVIOUS_RESULT and WINISIS_NEXT_RESULT constants. Example:
mfn = WinisisSearchResult(dbaseID, srch, 1);
while (mfn) {
mfn = WinisisSearchResult(dbaseID, srch, WINISIS_NEXT_RESULT);
}

MFN WinisisStoreSearchResults(dbaseID, Nsearch, MFNarea, areasize)
Fill the given area with the MFN resulting from search Nsearch. Return value: the
number of copied MFN.

int WinisisBrowseSearch(dbaseID, NSearch)
Ask Winisis to browse search number Nsearch.

int WinisisBrowseDatabase(dbaseID)
Ask Winisis to stop browsing a search and to display the full database.
ok WinisisLoadPageSet(dbaseID, name)
Load the current page settings from file "name.wpr".
void WinisisPrintPageSet(dbaseID, pageset struct)
Set the current page settings to the given PageSet structure. The PageSet structure
reproduces the parameters given in the Winisis Print Setup dialog box.
void WinisisPrint(dbaseID, MFN range)
Ask Winisis to print the given range of MFNs using the current page settings.
void WinisisPrintResults(dbaseID, NSearch)
Ask Winisis to print the given search set using the current page settings.
// [Not used]
// num WinisisIsBrowsingSearch() - If > 0 yes and gives the result number
Asks Winisis if it is browsing a search.

void WinisisMFNShow(dbaseID, MFN)
Read the given MFN and display it on the Winisis database window. If will refresh the
window in any case.

long WinisisMFNSeek(dbaseID, distance)
Move the current database of the given distance. The return value indicates the distance
from the previous MFN. For example the return value 0 would mean "no moving".
Example:
r = WinisisMFNSeek(dbID, 1); // go to next record
r = WinisisMFNSeek(dbID, -1); // go to previous record

void WinisisMFNGet(dbaseID, MFN, area, int areasize)
Put in area the RTF-style formatted record. The area must be large enough to contain the
formatted record. You may use the following constant value:
WINISIS_MAXFORMATOUTPUT
yesno WinisisMFNIsLocked(dbaseID, MFN)
Return zero if the record is not locked. Otherwise returns 1.
DBASEID WinisisEdit(dbaseID, MFN, worksheet)
Open the Winisis Data Entry window at the given MFN. Use
WINISIS_EDITNEWRECORD special constant as MFN to enter a new record.
yesno WinisisModifyRec(dbaseID, MFN, buffer, bufsize, status) using
Bireme's syntax
Modify the given MFN using Bireme's update language. Then writes the record to the
disk. Use WINISIS_ADDRECORD special constant to create a new record.
Messages Received by the Plugin
WMISIS_GETFOCUS
WMISIS_CLOSE
Plugin must showup
Plugin must close itself
WMISIS_OPENDATABASE
WMISIS_CLOSEDATABASE
A database has been opened (dbaseID)
A database has been closed (dbaseID)
WMISIS_MOVETO
WMISIS_SEARCHDONE
WMISIS_RECUPDATED
The user moved to a particular MFN (dbaseID, MFN)
A search has been executed (dbaseID, searchNum)
A record has been saved (dbaseID, MFN)
Non implemented yet
WMISIS_SELECTDATABASE
A database has been selected (dbaseID)
WMISIS_MINIMIZE
WMISIS_MAXIMIZE
WMISIS_RESTORE
Winisis has been minimized
Winisis has been maximized
Winisis has been restored
---------------------------> Dictionary Access Functions are not defined yet