ActiveState!

ActivePerl Documentation
Table of Contents

(Usage Statistics)
(about this ver)


* Getting Started
    * Welcome To ActivePerl
    * Release Notes
    * Readme
    * ActivePerl Change Log
* Install Notes
    * Linux
    * Solaris
    * Windows
* ActivePerl Components
    * Overview
    * PPM
    * Windows Specifics
       * OLE Browser
       * PerlScript
       * Perl for ISAPI
       * PerlEZ
* ActivePerl FAQ
    * Introduction
    * Availability & Install
    * Using PPM
    * Docs & Support
    * Windows Specifics
       * Perl for ISAPI
       * Windows 9X/NT/2000
       * Quirks
       * Web Server Config
       * Web programming
       * Programming
       * Modules & Samples
       * Embedding & Extending
       * Using OLE with Perl
* Windows Scripting
    * Active Server Pages
    * Windows Script Host
    * Windows Script Components

Core Perl Documentation


* perl
* perlfaq
* perltoc
* perlbook

* perlsyn
* perldata
* perlop
* perlreftut
* perldsc
* perllol

* perllexwarn
* perldebug

* perlrun
* perlfunc
* perlopentut
* perlvar
* perlsub
* perlmod
* perlpod

* perlstyle
* perlmodlib
* perlmodinstall
* perltrap
* perlport
* perlsec

* perlref
* perlre
* perlform
* perllocale
* perlunicode

* perlboot
* perltoot
* perltootc
* perlobj
* perlbot
* perltie

* perlipc
* perlnumber
* perlfork
* perlthrtut

* perldiag
* perlfaq1
* perlfaq2
* perlfaq3
* perlfaq4
* perlfaq5
* perlfaq6
* perlfaq7
* perlfaq8
* perlfaq9

* perlcompile

* perlembed
* perlxstut
* perlxs
* perlguts
* perlcall
* perlfilter
* perldbmfilter
* perlapi
* perlintern
* perlapio
* perltodo
* perlhack

* perlhist
* perldelta
* perl5005delta
* perl5004delta

* perlamiga
* perlcygwin
* perldos
* perlhpux
* perlmachten
* perlos2
* perlos390
* perlvms
* perlwin32

Pragmas


* attributes
* attrs
* autouse
* base
* blib
* bytes
* charnames
* constant
* diagnostics
* fields
* filetest
* integer
* less
* lib
* locale
* lwpcook
* open
* ops
* overload
* perllocal
* re
* sigtrap
* strict
* subs
* utf8
* vars
* warnings

Libraries


* ActivePerl
    * DocTools
        * TOC
            * RDF
* AnyDBM_File
* Archive
    * Tar
* AutoLoader
* AutoSplit
* B
    * Asmdata
    * Assembler
    * Bblock
    * Bytecode
    * C
    * CC
    * Debug
    * Deparse
    * Disassembler
    * Lint
    * Showlex
    * Stackobj
    * Terse
    * Xref
* Benchmark
* Bundle
    * LWP
* ByteLoader
* Carp
    * Heavy
* CGI
    * Apache
    * Carp
    * Cookie
    * Fast
    * Pretty
    * Push
    * Switch
* Class
    * Struct
* Compress
    * Zlib
* Config
* CPAN
    * FirstTime
    * Nox
* Cwd
* Data
    * Dumper
* DB
* Devel
    * DProf
    * Peek
    * SelfStubber
* Digest
    * HMAC
    * HMAC_MD5
    * HMAC_SHA1
    * MD2
    * MD5
    * SHA1
* DirHandle
* Dumpvalue
* DynaLoader
* English
* Env
* Errno
* Exporter
    * Heavy
* ExtUtils
    * Command
    * Embed
    * Install
    * Installed
    * Liblist
    * MakeMaker
    * Manifest
    * Miniperl
    * Mkbootstrap
    * Mksymlists
    * MM_Cygwin
    * MM_OS2
    * MM_Unix
    * MM_VMS
    * MM_Win32
    * Packlist
    * testlib
* Fatal
* Fcntl
* File
    * Basename
    * CheckTree
    * Compare
    * Copy
    * CounterFile
    * DosGlob
    * Find
    * Glob
    * Listing
    * Path
    * Spec
        * Functions
        * Mac
        * OS2
        * Unix
        * VMS
        * Win32
    * stat
* FileCache
* FileHandle
* FindBin
* Font
    * AFM
* Getopt
    * Long
    * Std
* HTML
    * AsSubs
    * Element
    * Entities
    * Filter
    * Form
    * FormatPS
    * Formatter
    * FormatText
    * HeadParser
    * LinkExtor
    * Parse
    * Parser
    * TokeParser
    * TreeBuilder
* HTTP
    * Cookies
    * Daemon
    * Date
    * Headers
        * Util
    * Message
    * Negotiate
    * Request
        * Common
    * Response
    * Status
* I18N
    * Collate
* IO
    * Dir
    * File
    * Handle
    * Pipe
    * Poll
    * Seekable
    * Select
    * Socket
        * INET
        * UNIX
* IPC
    * Msg
    * Open2
    * Open3
    * Semaphore
    * SysV
* LWP
    * Debug
    * MediaTypes
    * MemberMixin
    * Protocol
    * RobotUA
    * Simple
    * UserAgent
* Math
    * BigFloat
    * BigInt
    * Complex
    * Trig
* MD5
* MIME
    * Base64
    * QuotedPrint
* NDBM_File
* Net
    * Cmd
    * Config
    * Domain
    * DummyInetd
    * FTP
    * hostent
    * libnetFAQ
    * netent
    * Netrc
    * NNTP
    * PH
    * Ping
    * POP3
    * protoent
    * servent
    * SMTP
    * SNPP
    * Time
* O
* ODBM_File
* Opcode
* Pod
    * Checker
    * Find
    * Html
    * InputObjects
    * Man
    * Parser
    * ParseUtils
    * Plainer
    * Select
    * Text
        * Color
        * Termcap
    * Usage
* POSIX
* PPM
    * SOAPClient
    * SOAPServer
* Safe
* SDBM_File
* Search
    * Dict
* SelectSaver
* SelfLoader
* SHA
* Shell
* SOAP
    * Defs
    * Envelope
    * EnvelopeMaker
    * GenericHashSerializer
    * GenericInputStream
    * GenericScalarSerializer
    * Lite
    * OutputStream
    * Packager
    * Parser
    * Transport
        * HTTP
            * Apache
            * CGI
            * Client
            * Server
        * LOCAL
        * MAILTO
        * POP3
        * TCP
    * TypeMapper
* Socket
* Symbol
* Sys
    * Hostname
    * Syslog
* Term
    * ANSIColor
    * Cap
    * Complete
    * ReadLine
* Test
    * Harness
* Text
    * Abbrev
    * ParseWords
    * Soundex
    * Tabs
    * Wrap
* Thread
    * Queue
    * Semaphore
    * Signal
    * Specific
* Tie
    * Array
    * Handle
    * Hash
    * RefHash
    * Scalar
    * SubstrHash
* Time
    * gmtime
    * Local
    * localtime
    * tm
* UDDI
    * Lite
* UNIVERSAL
* URI
    * data
    * Escape
    * file
    * Heuristic
    * ldap
    * URL
    * WithBase
* User
    * grent
    * pwent
* Win32
    * AuthenticateUser
    * ChangeNotify
    * Clipboard
    * Console
    * Event
    * EventLog
    * File
    * FileSecurity
    * Internet
    * IPC
    * Mutex
    * NetAdmin
    * NetResource
    * ODBC
    * OLE
        * Const
        * Enum
        * NEWS
        * NLS
        * TPJ
        * Variant
    * PerfLib
    * Pipe
    * Process
    * Registry
    * Semaphore
    * Service
    * Sound
    * TieRegistry
* Win32API
    * File
    * Net
    * Registry
* WWW
    * RobotRules
        * AnyDBM_File
* XML
    * Element
    * Parser
        * Expat
    * PPD
    * PPMConfig
    * ValidatingElement
* XSLoader

 PerlEz - PerlEz host DLL


NAME

PerlEz - PerlEz host DLL


SUPPORTED PLATFORMS

  • Windows

DESCRIPTION

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.

Datatypes

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.

PerlEzCreate

 PERLEZHANDLE PerlEzCreate(LPCSTR lpFileName, LPCSTR lpOptions);
DESCRIPTION:
  • 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.

    PARAMS:
  • lpFileName a pointer to a ASCIIZ string that is the name of a file; can be NULL

  • 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.

    RETURNS:
  • A non zero handle to a Perl interpreter if successful; zero otherwise. Call PerlEzDelete to release this handle.

    See also PerlEzDelete PerlEzCreateOpt

  • PerlEzCreateOpt

     PERLEZHANDLE PerlEzCreateOpt(LPCSTR lpFileName, LPCSTR lpOptions, LPCSTR lpScriptOpts);
    DESCRIPTION:
  • 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.

    PARAMS:
  • lpFileName a pointer to a ASCIIZ string that is the name of a file; can be NULL

  • 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.

  • lpScriptOpts a pointer to a ASCIIZ string that are the command line options that will be provided as parameters to the script; can be NULL.

    RETURNS:
  • A non zero handle to a Perl interpreter if successful; zero otherwise. Call PerlEzDelete to release this handle.

    See also PerlEzDelete PerlEzCreate

  • PerlEzDelete

     BOOL PerlEzDelete(PERLEZHANDLE hHandle);
    DESCRIPTION:
  • Deletes a previously created Perl interpreter. Releases all resources allocated by PerlEzCreate or PerlEzCreateOpt.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

    RETURNS:
  • True if no error false otherwise.

  • PerlEzEvalString

     int PerlEzEvalString(PERLEZHANDLE hHandle, LPCSTR lpString, LPSTR lpBuffer, DWORD dwBufSize);
    DESCRIPTION:
  • Evaluates the string a returns the result in lpBuffer. If there is an error $! is returned in lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpString a pointer to the ASCIIZ string to evaluate

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCall1

     int PerlEzCall1(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, LPVOID lpVoid);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • lpVoid a pointer to a parameter will be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCall2

     int PerlEzCall2(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
      LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • lpVoid1...2 pointers to parameters that will be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCall4

     int PerlEzCall4(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
       LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2, LPVOID lpVoid3, LPVOID lpVoid4);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • lpVoid1...4 pointers to parameters that will be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCall8

     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);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • lpVoid1...8 pointers to parameters that will be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCall

     int PerlEzCall(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
       LPCSTR lpFormat, ...);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • ... parameters to be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzCallContext

     int PerlEzCallContext(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPVOID lpContextInfo,
       LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, ...);
    DESCRIPTION:
  • Calls the function lpFunction and returns the result in the buffer lpBuffer.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpFunction a pointer name of the function to call

  • lpContextInfo context info for magic fetch and store functions

  • lpBuffer a pointer to the buffer where the result will be placed

  • dwBufSize the size in bytes of the space where lpBuffer points

  • lpFormat a pointer to the parameter specifier; can be NULL. See Format String

  • ... parameters to be interpreted based on lpFormat

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

  • PerlEzSetMagicScalarFunctions

     int PerlEzSetMagicScalarFunctions(PERLEZHANDLE hHandle, LPFETCHVALUEFUNCTION lpfFetch,
                    LPSTOREVALUEFUNCTION lpfStore);
    DESCRIPTION:
  • Sets the call back function pointers for magic scalar variables.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • lpfFetch a pointer to the call back function for fetching a string. if lpfFetch is NULL, then the scalar is write only.

  • lpfStore a pointer to the call back function for storinging a string. if lpfStore is NULL, then the scalar is read only.

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes NOTE: if lpfFetch and lpfStore are both NULL, then it is an error.

    See also PerlEzSetMagicScalarName

  • PerlEzSetMagicScalarName

     int PerlEzSetMagicScalarName(PERLEZHANDLE hHandle, LPCSTR pVariableName);
    DESCRIPTION:
  • Creates the variable if it does not exists and sets it to be tied to the call back function pointer for magic variables.

    PARAMS:
  • hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt

  • pVariableName a pointer to the name of the variable.

    RETURNS:
  • A zero if no error; otherwise error code. See Error Codes

    See also PerlEzSetMagicScalarFunctions

  • Format String

    The format string is a series of characters that represents the type of parameters being supplied.

    s
  • this parameter is a pointer to a null terminated string.

    i
  • this parameter is to be considered an integer.

    d
  • this parameter is to be considered a double.

    l[s | i | d]x
  • the next 'x' parameters will be put into an anonymous list of the type specifed. Either 's', 'i', or 'd'

  • Error Codes

    1. More space is needed to return a result

    2. Error string returned in the buffer

    3. More space needed to return the error message

    4. Format string is invalid

    5. Function call caused an exception

    6. Handle is invalid

    7. The second call to PerlEzSetMagicFunction failed

    8. Invalid parameter was passed to the routine

    9. Cannot allocate more memory


    AUTHORS

    This document is maintained by Douglas Lankshear <dougl@ActiveState.com>

     PerlEz - PerlEz host DLL