home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _00bbf55321c8f1f07dbdcc23cc4744b6 < prev    next >
Encoding:
Text File  |  2004-06-01  |  11.2 KB  |  588 lines

  1. =head1 NAME
  2.  
  3. PerlEz - PerlEz host DLL
  4.  
  5. =head1 DESCRIPTION
  6.  
  7. This document attempts to describe the functions of the PerlEz host Dynamically
  8. Linked Library (DLL). Please refer any questions or comments to the author below.
  9.  
  10. =head2 Datatypes
  11.  
  12. PerlEz has one specific data type, PERLEZHANDLE; this is a non-zero handle to
  13. a Perl interpreter that is created and can be accessed by the routines described below.
  14.  
  15. =head2 PerlEzCreate
  16.  
  17. =over 
  18.  
  19.  PERLEZHANDLE PerlEzCreate(LPCSTR lpFileName, LPCSTR lpOptions);
  20.  
  21. =item DESCRIPTION:
  22.  
  23. =item *
  24.  
  25. Creates a Perl interpreter. The return value is required parameter for all subsequent æPerlEzÆ calls.
  26. Multiple interpreters can be created, but only one will be executing at a time.
  27.  
  28. =item PARAMS:
  29.  
  30. =item *
  31.  
  32. lpFileName a pointer to a ASCIIZ string that is the name of a file; can be NULL 
  33.  
  34. =item *
  35.  
  36. lpOptions a pointer to a ASCIIZ string that are the command line options that
  37. will be provided before the script; can be NULL. This parameter is used for setting @INC or debugging. 
  38.  
  39. =item RETURNS:
  40.  
  41. =item *
  42.  
  43. A non zero handle to a Perl interpreter if successful; zero otherwise. Call PerlEzDelete to release this handle.
  44.  
  45. See also L</PerlEzDelete> L</PerlEzCreateOpt>
  46.  
  47. =back
  48.  
  49. =head2 PerlEzCreateOpt
  50.  
  51. =over 
  52.  
  53.  PERLEZHANDLE PerlEzCreateOpt(LPCSTR lpFileName, LPCSTR lpOptions, LPCSTR lpScriptOpts);
  54.  
  55. =item DESCRIPTION:
  56.  
  57. =item *
  58.  
  59. Creates a Perl interpreter. The return value is required parameter for all subsequent æPerlEzÆ calls.
  60. Multiple interpreters can be created, but only one will be executing at a time.
  61.  
  62. =item PARAMS:
  63.  
  64. =item *
  65.  
  66. lpFileName a pointer to a ASCIIZ string that is the name of a file; can be NULL 
  67.  
  68. =item *
  69.  
  70. lpOptions a pointer to a ASCIIZ string that are the command line options that
  71. will be provided before the script; can be NULL. This parameter is used for setting @INC or debugging. 
  72.  
  73. =item *
  74.  
  75. lpScriptOpts a pointer to a ASCIIZ string that are the command line options that
  76. will be provided as parameters to the script; can be NULL.
  77.  
  78. =item RETURNS:
  79.  
  80. =item *
  81.  
  82. A non zero handle to a Perl interpreter if successful; zero otherwise. Call PerlEzDelete to release this handle.
  83.  
  84. See also L</PerlEzDelete> L</PerlEzCreate>
  85.  
  86. =back
  87.  
  88. =head2 PerlEzDelete
  89.  
  90. =over 
  91.  
  92.  BOOL PerlEzDelete(PERLEZHANDLE hHandle);
  93.  
  94. =item DESCRIPTION:
  95.  
  96. =item *
  97.  
  98. Deletes a previously created Perl interpreter. Releases all resources allocated by PerlEzCreate or PerlEzCreateOpt.
  99.  
  100. =item PARAMS:
  101.  
  102. =item *
  103.  
  104. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  105.  
  106. =item RETURNS:
  107.  
  108. =item *
  109.  
  110. True if no error false otherwise.
  111.  
  112. =back
  113.  
  114. =head2 PerlEzEvalString
  115.  
  116. =over 
  117.  
  118.  int PerlEzEvalString(PERLEZHANDLE hHandle, LPCSTR lpString, LPSTR lpBuffer, DWORD dwBufSize);
  119.  
  120. =item DESCRIPTION:
  121.  
  122. =item *
  123.  
  124. Evaluates the string a returns the result in lpBuffer. If there is an error $! is returned in lpBuffer.
  125.  
  126. =item PARAMS:
  127.  
  128. =item *
  129.  
  130. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  131.  
  132. =item *
  133.  
  134. lpString a pointer to the ASCIIZ string to evaluate
  135.  
  136. =item *
  137.  
  138. lpBuffer a pointer to the buffer where the result will be placed
  139.  
  140. =item *
  141.  
  142. dwBufSize the size in bytes of the space where lpBuffer points
  143.  
  144. =item RETURNS:
  145.  
  146. =item *
  147.  
  148. A zero if no error; otherwise error code. See L</"Error Codes">
  149.  
  150. =back
  151.  
  152. =head2 PerlEzCall1
  153.  
  154. =over
  155.  
  156.  int PerlEzCall1(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, LPVOID lpVoid);
  157.  
  158. =item DESCRIPTION:
  159.  
  160. =item *
  161.  
  162. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  163.  
  164. =item PARAMS:
  165.  
  166. =item *
  167.  
  168. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  169.  
  170. =item *
  171.  
  172. lpFunction a pointer name of the function to call
  173.  
  174. =item *
  175.  
  176. lpBuffer a pointer to the buffer where the result will be placed
  177.  
  178. =item *
  179.  
  180. dwBufSize the size in bytes of the space where lpBuffer points
  181.  
  182. =item *
  183.  
  184. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  185.  
  186. =item *
  187.  
  188. lpVoid a pointer to a parameter will be interpreted based on lpFormat
  189.  
  190. =item RETURNS:
  191.  
  192. =item *
  193.  
  194. A zero if no error; otherwise error code. See L</"Error Codes">
  195.  
  196. =back
  197.  
  198. =head2 PerlEzCall2
  199.  
  200. =over 
  201.  
  202.  int PerlEzCall2(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
  203.   LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2);
  204.  
  205. =item DESCRIPTION:
  206.  
  207. =item *
  208.  
  209. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  210.  
  211. =item PARAMS:
  212.  
  213. =item *
  214.  
  215. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  216.  
  217. =item *
  218.  
  219. lpFunction a pointer name of the function to call
  220.  
  221. =item *
  222.  
  223. lpBuffer a pointer to the buffer where the result will be placed
  224.  
  225. =item *
  226.  
  227. dwBufSize the size in bytes of the space where lpBuffer points
  228.  
  229. =item *
  230.  
  231. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  232.  
  233. =item *
  234.  
  235. lpVoid1...2 pointers to parameters that will be interpreted based on lpFormat
  236.  
  237. =item RETURNS:
  238.  
  239. =item *
  240.  
  241. A zero if no error; otherwise error code. See L</"Error Codes">
  242.  
  243. =back
  244.  
  245. =head2 PerlEzCall4
  246.  
  247. =over
  248.  
  249.  int PerlEzCall4(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
  250.    LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2, LPVOID lpVoid3, LPVOID lpVoid4);
  251.  
  252. =item DESCRIPTION:
  253.  
  254. =item *
  255.  
  256. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  257.  
  258. =item PARAMS:
  259.  
  260. =item *
  261.  
  262. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  263.  
  264. =item *
  265.  
  266. lpFunction a pointer name of the function to call
  267.  
  268. =item *
  269.  
  270. lpBuffer a pointer to the buffer where the result will be placed
  271.  
  272. =item *
  273.  
  274. dwBufSize the size in bytes of the space where lpBuffer points
  275.  
  276. =item *
  277.  
  278. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  279.  
  280. =item *
  281.  
  282. lpVoid1...4 pointers to parameters that will be interpreted based on lpFormat
  283.  
  284. =item RETURNS:
  285.  
  286. =item *
  287.  
  288. A zero if no error; otherwise error code. See L</"Error Codes">
  289.  
  290. =back 
  291.  
  292. =head2 PerlEzCall8
  293.  
  294. =over
  295.  
  296.  int PerlEzCall8(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
  297.    LPCSTR lpFormat, LPVOID lpVoid1, LPVOID lpVoid2, LPVOID lpVoid3, LPVOID lpVoid4, LPVOID lpVoid5,
  298.    LPVOID lpVoid6, LPVOID lpVoid7, LPVOID lpVoid8);
  299.  
  300. =item DESCRIPTION:
  301.  
  302. =item *
  303.  
  304. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  305.  
  306. =item PARAMS:
  307.  
  308. =item *
  309.  
  310. hHandle    a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  311.  
  312. =item *
  313.  
  314. lpFunction a pointer name of the function to call
  315.  
  316. =item *
  317.  
  318. lpBuffer a pointer to the buffer where the result will be placed
  319.  
  320. =item *
  321.  
  322. dwBufSize the size in bytes of the space where lpBuffer points
  323.  
  324. =item *
  325.  
  326. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  327.  
  328. =item *
  329.  
  330. lpVoid1...8 pointers to parameters that will be interpreted based on lpFormat
  331.  
  332. =item RETURNS:
  333.  
  334. =item *
  335.  
  336. A zero if no error; otherwise error code. See L</"Error Codes">
  337.  
  338. =back
  339.  
  340. =head2 PerlEzCall
  341.  
  342. =over
  343.  
  344.  int PerlEzCall(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPSTR lpBuffer, DWORD dwBufSize,
  345.    LPCSTR lpFormat, ...);
  346.  
  347. =item DESCRIPTION:
  348.  
  349. =item *
  350.  
  351. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  352.  
  353. =item PARAMS:
  354.  
  355. =item *
  356.  
  357. hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  358.  
  359. =item *
  360.  
  361. lpFunction a pointer name of the function to call
  362.  
  363. =item *
  364.  
  365. lpBuffer a pointer to the buffer where the result will be placed
  366.  
  367. =item *
  368.  
  369. dwBufSize the size in bytes of the space where lpBuffer points
  370.  
  371. =item *
  372.  
  373. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  374.  
  375. =item *
  376.  
  377. ... parameters to be interpreted based on lpFormat
  378.  
  379. =item RETURNS:
  380.  
  381. =item *
  382.  
  383. A zero if no error; otherwise error code. See L</"Error Codes">
  384.  
  385. =back
  386.  
  387. =head2 PerlEzCallContext
  388.  
  389. =over
  390.  
  391.  int PerlEzCallContext(PERLEZHANDLE hHandle, LPCSTR lpFunction, LPVOID lpContextInfo,
  392.    LPSTR lpBuffer, DWORD dwBufSize, LPCSTR lpFormat, ...);
  393.  
  394. =item DESCRIPTION:
  395.  
  396. =item *
  397.  
  398. Calls the function lpFunction and returns the result in the buffer lpBuffer.
  399.  
  400. =item PARAMS:
  401.  
  402. =item *
  403.  
  404. hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  405.  
  406. =item *
  407.  
  408. lpFunction a pointer name of the function to call
  409.  
  410. =item *
  411.  
  412. lpContextInfo context info for magic fetch and store functions
  413.  
  414. =item *
  415.  
  416. lpBuffer a pointer to the buffer where the result will be placed
  417.  
  418. =item *
  419.  
  420. dwBufSize the size in bytes of the space where lpBuffer points
  421.  
  422. =item *
  423.  
  424. lpFormat a pointer to the parameter specifier; can be NULL. See L</"Format String">
  425.  
  426. =item *
  427.  
  428. ... parameters to be interpreted based on lpFormat
  429.  
  430. =item RETURNS:
  431.  
  432. =item *
  433.  
  434. A zero if no error; otherwise error code. See L</"Error Codes">
  435.  
  436. =back
  437.  
  438. =head2 PerlEzSetMagicScalarFunctions
  439.  
  440. =over 
  441.  
  442.  int PerlEzSetMagicScalarFunctions(PERLEZHANDLE hHandle, LPFETCHVALUEFUNCTION lpfFetch,
  443.         LPSTOREVALUEFUNCTION lpfStore);
  444.  
  445. =item DESCRIPTION:
  446.  
  447. =item *
  448.  
  449. Sets the call back function pointers for magic scalar variables.
  450.  
  451. =item PARAMS:
  452.  
  453. =item *
  454.  
  455. hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  456.  
  457. =item *
  458.  
  459. lpfFetch a pointer to the call back function for fetching a string. 
  460. if lpfFetch is NULL, then the scalar is write only.
  461.  
  462. =item *
  463.  
  464. lpfStore a pointer to the call back function for storinging a string.
  465. if lpfStore is NULL, then the scalar is read only.
  466.  
  467. =item RETURNS:
  468.  
  469. =item *
  470.  
  471. A zero if no error; otherwise error code. See L</"Error Codes">
  472. NOTE: if lpfFetch and lpfStore are both NULL, then it is an error.
  473.  
  474. See also L</PerlEzSetMagicScalarName>
  475.  
  476. =back
  477.  
  478. =head2 PerlEzSetMagicScalarName
  479.  
  480. =over 
  481.  
  482.  int PerlEzSetMagicScalarName(PERLEZHANDLE hHandle, LPCSTR pVariableName);
  483.  
  484. =item DESCRIPTION:
  485.  
  486. =item *
  487.  
  488. Creates the variable if it does not exists and sets it to be tied to
  489. the call back function pointer for magic variables.
  490.  
  491. =item PARAMS:
  492.  
  493. =item *
  494.  
  495. hHandle a handle returned by the call to PerlEzCreate or PerlEzCreateOpt
  496.  
  497. =item *
  498.  
  499. pVariableName a pointer to the name of the variable.
  500.  
  501. =item RETURNS:
  502.  
  503. =item *
  504.  
  505. A zero if no error; otherwise error code. See L</"Error Codes">
  506.  
  507. See also L</PerlEzSetMagicScalarFunctions>
  508.  
  509. =back
  510.  
  511. =head2 Format String
  512.  
  513. =over
  514.  
  515. The format string is a series of characters that represents the type of parameters being supplied.
  516.  
  517. =item s
  518.  
  519. =item *
  520.  
  521. this parameter is a pointer to a null terminated string.
  522.  
  523. =item i
  524.  
  525. =item *
  526.  
  527. this parameter is to be considered an integer.
  528.  
  529. =item d
  530.  
  531. =item *
  532.  
  533. this parameter is to be considered a double.
  534.  
  535. =item l[s | i | d]x
  536.  
  537. =item *
  538.  
  539. the next 'x' parameters will be put into an anonymous list of the type specifed. Either 's', 'i', or 'd' 
  540.  
  541. =back
  542.  
  543. =head2 Error Codes
  544.  
  545. =over
  546.  
  547. =item 1
  548.  
  549. More space is needed to return a result
  550.  
  551. =item 2
  552.  
  553. Error string returned in the buffer
  554.  
  555. =item 3
  556.  
  557. More space needed to return the error message
  558.  
  559. =item 4
  560.  
  561. Format string is invalid
  562.  
  563. =item 5
  564.  
  565. Function call caused an exception
  566.  
  567. =item 6
  568.  
  569. Handle is invalid
  570.  
  571. =item 7
  572.  
  573. The second call to PerlEzSetMagicFunction failed
  574.  
  575. =item 8
  576.  
  577. Invalid parameter was passed to the routine
  578.  
  579. =item 9
  580.  
  581. Cannot allocate more memory
  582.  
  583. =back
  584.  
  585. =head1 AUTHORS
  586.  
  587. Copyright (c) 1998-2003 ActiveState Corp.  All rights reserved.
  588.