From e71ca2ffd3e91e08cff8902e73ae01afcf99c151 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Sat, 20 Jul 2002 15:23:25 +0000 Subject: [PATCH] Adding documentation gathered from source files and also add comments to examples. Some minor problems may be in my observations, but in general IMHO what I have written down is right. I worked from the C source... git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@89206 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/w32api/functions/w32api-deftype.xml | 13 +++-- .../w32api/functions/w32api-init-dtype.xml | 16 ++++--- .../functions/w32api-invoke-function.xml | 11 ++++- .../functions/w32api-register-function.xml | 9 +++- .../functions/w32api-set-call-method.xml | 7 ++- reference/w32api/reference.xml | 47 +++++++++++++++---- 6 files changed, 79 insertions(+), 24 deletions(-) diff --git a/reference/w32api/functions/w32api-deftype.xml b/reference/w32api/functions/w32api-deftype.xml index e34f8e80b2..11bebf9429 100644 --- a/reference/w32api/functions/w32api-deftype.xml +++ b/reference/w32api/functions/w32api-deftype.xml @@ -1,5 +1,5 @@ - + @@ -9,14 +9,21 @@ Description - intw32api_deftype + boolw32api_deftype stringtypename stringmember1_type stringmember1_name + string... + string... &warn.experimental.func; - &warn.undocumented.func; + If you would like to define a type for a w32api call, you need to call + w32api_deftype. This function takes 2n+1 arguments, + where n is the number of members the type has. The first argument is the + name of the type. After that is the type of the member followed by the + members name (in pairs). A member type can be a user defined type. + &return.success; diff --git a/reference/w32api/functions/w32api-init-dtype.xml b/reference/w32api/functions/w32api-init-dtype.xml index 868b883722..180c6ee6a2 100644 --- a/reference/w32api/functions/w32api-init-dtype.xml +++ b/reference/w32api/functions/w32api-init-dtype.xml @@ -1,13 +1,11 @@ - + w32api_init_dtype - Creates an instance to the data type typename and fills it with - the values val1, val2, the function then returns a DYNAPARM which can be - passed when invoking a function as a parameter + Creates an instance of the data type typename and fills it with the values passed @@ -15,12 +13,16 @@ resourcew32api_init_dtype stringtypename - mixedval1 - mixedval2 + mixedvalue + mixed... &warn.experimental.func; - &warn.undocumented.func; + This function creates an instance of the data type named + typename, filling in the values of the data + type. You should give the values in the same order as you defined the + data type with w32api_deftype. The type of the + resource returned is dynaparm. diff --git a/reference/w32api/functions/w32api-invoke-function.xml b/reference/w32api/functions/w32api-invoke-function.xml index 01a0c1d65a..75c9a85f5b 100644 --- a/reference/w32api/functions/w32api-invoke-function.xml +++ b/reference/w32api/functions/w32api-invoke-function.xml @@ -1,5 +1,5 @@ - + @@ -11,10 +11,17 @@ mixedw32api_invoke_function stringfuncname + mixedargument + mixed... &warn.experimental.func; - &warn.undocumented.func; + w32api_invoke_function tries to find the previously + registered function, named funcname, passing the + parameters you provided. The return type is the one you set when you + registered the function, the value is the one returned by the function + itself. Any of the arguments can be of any PHP type or + w32api_deftype defined type, as needed. diff --git a/reference/w32api/functions/w32api-register-function.xml b/reference/w32api/functions/w32api-register-function.xml index 32c3a52cc9..5677fb7010 100644 --- a/reference/w32api/functions/w32api-register-function.xml +++ b/reference/w32api/functions/w32api-register-function.xml @@ -1,5 +1,5 @@ - + @@ -12,10 +12,15 @@ boolw32api_register_function stringlibary stringfunction_name + stringreturn_type &warn.experimental.func; - &warn.undocumented.func; + This function tries to find the function_name function + in libary, and tries to import it into PHP. The function + will be registered with the given return_type. This type + can be a generic PHP type, or a type defined with w32api_deftype. + &return.success; diff --git a/reference/w32api/functions/w32api-set-call-method.xml b/reference/w32api/functions/w32api-set-call-method.xml index fed999872d..43771d1978 100644 --- a/reference/w32api/functions/w32api-set-call-method.xml +++ b/reference/w32api/functions/w32api-set-call-method.xml @@ -1,5 +1,5 @@ - + @@ -14,7 +14,10 @@ &warn.experimental.func; - &warn.undocumented.func; + This function sets the method call type. The parameter can be + one of the constants DC_CALL_CDECL or + DC_CALL_STD. The extension default is + DC_CALL_STD. diff --git a/reference/w32api/reference.xml b/reference/w32api/reference.xml index 099a2bd795..66a171b888 100644 --- a/reference/w32api/reference.xml +++ b/reference/w32api/reference.xml @@ -1,5 +1,5 @@ - + W32api functions W32api @@ -8,17 +8,42 @@
&reftitle.intro; - This extension is a generic extension api to DLLs. This was originally - written to allow access to the Win32 API from PHP. Although you can also + This extension is a generic extension API to DLLs. This was originally + written to allow access to the Win32 API from PHP, although you can also access other functions exported via other DLLs. - Currently supported types are generic PHP types (strings, bools, doubles, - longs and null's) others will be added in the future. + Currently supported types are generic PHP types (strings, booleans, floats, + integers and nulls) and types you define with w32api_deftype. &warn.experimental;
+ +
+ &reftitle.required; + + This extension will only work on Windows systems. + +
+
+ &reftitle.install; + &no.install; +
+ +
+ &reftitle.runtime; + &no.config; +
+ +
+ &reftitle.resources; + + This extension defines one resource type, used for user defined types. + The name of this resource is "dynaparm". + +
+ &reference.w32api.constants;
@@ -28,7 +53,7 @@ displays it in a message box. - Get the uptime and display in a message box + Get the uptime and display it in a message box