home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_aa5bb4342db07161e8eeab09b3276419
< prev
next >
Wrap
Text File
|
2000-03-23
|
13KB
|
450 lines
<HTML>
<HEAD>
<TITLE>PerlEz - PerlEz host DLL</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> PerlEz - PerlEz host DLL</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<UL>
<LI><A HREF="#datatypes">Datatypes</A></LI>
<LI><A HREF="#perlezcreate">PerlEzCreate</A></LI>
<LI><A HREF="#perlezdelete">PerlEzDelete</A></LI>
<LI><A HREF="#perlezevalstring">PerlEzEvalString</A></LI>
<LI><A HREF="#perlezcall1">PerlEzCall1</A></LI>
<LI><A HREF="#perlezcall2">PerlEzCall2</A></LI>
<LI><A HREF="#perlezcall4">PerlEzCall4</A></LI>
<LI><A HREF="#perlezcall8">PerlEzCall8</A></LI>
<LI><A HREF="#perlezcall">PerlEzCall</A></LI>
<LI><A HREF="#perlezcallcontext">PerlEzCallContext</A></LI>
<LI><A HREF="#perlezsetmagicscalarfunctions">PerlEzSetMagicScalarFunctions</A></LI>
<LI><A HREF="#perlezsetmagicscalarname">PerlEzSetMagicScalarName</A></LI>
<LI><A HREF="#format string">Format String</A></LI>
</UL>
<LI><A HREF="#authors">AUTHORS</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>PerlEz - PerlEz host DLL</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Windows</LI>
</UL>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This document attempts to describe the functions of the PerlEz host Dynamicly
Linked Library (DLL). Please refer any questions or comments to the author below.</P>
<P>
<H2><A NAME="datatypes">Datatypes</A></H2>
<P>PerlEz has one specific data type, PERLEZHANDLE; this is a non-zero handle to
a Perl interpreter that is created and can be accessed by the routines described below.</P>
<P>
<H2><A NAME="perlezcreate">PerlEzCreate</A></H2>
<PRE>
PERLEZHANDLE PerlEzCreate(LPCSTR lpFileName, LPSTR lpOptions);</PRE>
<DL>
<DT><STRONG><A NAME="item_DESCRIPTION%3A">DESCRIPTION:</A></STRONG><BR>
<DD>
<LI>
Creates a Perl interpreter. The return value is required parameter for all subsequent æPerlEzÆ calls.
Multiple interpreters can be created, but only one will be executing at a time.
<P></P>
<DT><STRONG><A NAME="item_PARAMS%3A">PARAMS:</A></STRONG><BR>
<DD>
<LI>
lpFileName a pointer to a ASCIIZ string that is the name of a file; can be NULL
<P></P>
<LI>
lpOptions a pointer to a ASCIIZ string that are the command line options that
will be provided before the script; can be NULL. This parameter is used for setting @INC or debugging.
<P></P>
<DT><STRONG><A NAME="item_RETURNS%3A">RETURNS:</A></STRONG><BR>
<DD>
<LI>
A non zero handle to a Perl interpreter if successful; zero otherwise. Call PerlEzDelete to release this handle.
<P>See also <A HREF="#perlezdelete">PerlEzDelete</A></P>
<P></P></DL>
<P>
<H2><A NAME="perlezdelete">PerlEzDelete</A></H2>
<PRE>
BOOL PerlEzDelete(PERLEZHANDLE hHandle);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Deletes a previously created Perl interpreter. Releases all resources allocated by PerlEzCreate.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
True if no error false otherwise.
<P></P></DL>
<P>
<H2><A NAME="perlezevalstring">PerlEzEvalString</A></H2>
<PRE>
int PerlEzEvalString(PERLEZHANDLE hHandle, LPCSTR lpString, LPSTR lpBuffer, DWORD dwBufSize);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Evaluates the string a returns the result in lpBuffer. If there is an error $! is returned in lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpString a pointer to the ASCIIZ string to evaluate
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcall1">PerlEzCall1</A></H2>
<PRE>
int PerlEzCall1(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, LPVOID lpVoid);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
lpVoid a pointer to a parameter will be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcall2">PerlEzCall2</A></H2>
<PRE>
int PerlEzCall2(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
lpVoid1...2 pointers to parameters that will be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcall4">PerlEzCall4</A></H2>
<PRE>
int PerlEzCall4(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2, LPVOID lpVoid3, LPVOID lpVoid4);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
lpVoid1...4 pointers to parameters that will be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcall8">PerlEzCall8</A></H2>
<PRE>
int PerlEzCall8(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2, LPVOID lpVoid3, LPVOID lpVoid4, LPVOID lpVoid5,
LPVOID lpVoid6, LPVOID lpVoid7, LPVOID lpVoid8);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
lpVoid1...8 pointers to parameters that will be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcall">PerlEzCall</A></H2>
<PRE>
int PerlEzCall(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
LPCSTR lpFormat, ...);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
... parameters to be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezcallcontext">PerlEzCallContext</A></H2>
<PRE>
int PerlEzCallContext(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPVOID lpContextInfo,
LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, ...);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Calls the function lpFunction and returns the result in the buffer lpBuffer.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpFunction a pointer name of the function to call
<P></P>
<LI>
lpContextInfo context info for magic fetch and store functions
<P></P>
<LI>
lpBuffer a pointer to the buffer where the result will be placed
<P></P>
<LI>
dwBufSize the size in bytes of the space where lpBuffer points
<P></P>
<LI>
lpFormat a pointer to the parameter specifier; can be NULL. See <A HREF="#format string">Format String</A>
<P></P>
<LI>
... parameters to be interpreted based on lpFormat
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P></P></DL>
<P>
<H2><A NAME="perlezsetmagicscalarfunctions">PerlEzSetMagicScalarFunctions</A></H2>
<PRE>
int PerlEzSetMagicScalarFunctions(PERLEZHANDLE hHandle, LPFETCHVALUEFUNCTION lpfFetch,
LPSTOREVALUEFUNCTION lpfStore);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Sets the call back function pointers for magic scalar variables.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate
<P></P>
<LI>
lpfFetch a pointer to the call back function for fetching a string.
if lpfFetch is NULL, then the scalar is write only.
<P></P>
<LI>
lpfStore a pointer to the call back function for storinging a string.
if lpfStore is NULL, then the scalar is read only.
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
NOTE: if lpfFetch and lpfStore are both NULL, then it is an error.
<P>See also <A HREF="#perlezsetmagicscalarname">PerlEzSetMagicScalarName</A></P>
<P></P></DL>
<P>
<H2><A NAME="perlezsetmagicscalarname">PerlEzSetMagicScalarName</A></H2>
<PRE>
int PerlEzSetMagicScalarName(PERLEZHANDLE hHandle, LPCSTR pVariableName);</PRE>
<DL>
<DT><STRONG>DESCRIPTION:</STRONG><BR>
<DD>
<LI>
Creates the variable if it does not exists and sets it to be tied to
the call back function pointer for magic variables.
<P></P>
<DT><STRONG>PARAMS:</STRONG><BR>
<DD>
<LI>
hHandle a handle returned by the call to PerlEzCreate.
<P></P>
<LI>
pVariableName a pointer to the name of the variable.
<P></P>
<DT><STRONG>RETURNS:</STRONG><BR>
<DD>
<LI>
A zero if no error; otherwise error code.
<P>See also <A HREF="#perlezsetmagicscalarfunctions">PerlEzSetMagicScalarFunctions</A></P>
<P></P></DL>
<P>
<H2><A NAME="format string">Format String</A></H2>
<P>The format string is a series of characters that represents the type of parameters being supplied.</P>
<DL>
<DT><STRONG><A NAME="item_s">s</A></STRONG><BR>
<DD>
<LI>
this parameter is a pointer to a null terminated string.
<P></P>
<DT><STRONG><A NAME="item_i">i</A></STRONG><BR>
<DD>
<LI>
this parameter is to be considered an integer.
<P></P>
<DT><STRONG><A NAME="item_d">d</A></STRONG><BR>
<DD>
<LI>
this parameter is to be considered a double.
<P></P>
<DT><STRONG><A NAME="item_l%5Bs_%7C_i_%7C_d%5Dx">l[s | i | d]x</A></STRONG><BR>
<DD>
<LI>
the next 'x' parameters will be put into an anonymous list of the type specifed. Either 's', 'i', or 'd'
<P></P></DL>
<P>
<HR>
<H1><A NAME="authors">AUTHORS</A></H1>
<P>This document is maintained by Douglas Lankshear <<A HREF="mailto:dougl@ActiveState.com">dougl@ActiveState.com</A>></P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> PerlEz - PerlEz host DLL</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>