Bug #49497 [Fbk->NoF]: No ability to supply a userland PHP function as a callback for a COM method.
| From: | php-bugs at lists dot php dot net | Date: | Sun, 16 Feb 2020 04:22:05 +0000 |
| Subject: | Bug #49497 [Fbk->NoF]: No ability to supply a userland PHP function as a callback for a COM method. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225593@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=49497&edit=1
ID: 49497
Updated by: php-bugs@lists.php.net
Reported by: RQuadling at GMail dot com
Summary: No ability to supply a userland PHP function as a
callback for a COM method.
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: COM related
Operating System: Windows XP SP3
PHP Version: 5.3SVN-2009-09-08 (snap)
Assigned To: cmb
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2020-02-08 11:01:30] cmb@php.net
> The "value" to be supplied is of type VT_I4. This is essentially
> just the address of the function (as I see things).
That sounds a bit weird; I mean why storing a pointer as signed
integer? I would rather expect that they use a VT_UI4, or more
likely a VT_PTR. And actually, why would that API not accept a
VT_DISPATCH, and call a certain method on that? The latter is
already supported by the COM extension, through `new
variant($php_obj);`.
Is it possible that the VT_I4 is supposed to be a DISPID? Is that
documentation still publicly available?
------------------------------------------------------------------------
[2009-09-08 08:59:42] RQuadling at GMail dot com
Description:
------------
Hi.
I think I'm pretty much on my own here, but here goes.
I'm evaluating a COM tool to allow me to OCR documents.
The COM object requires the registration of a callback to allow the
object to send results as it finds them (events in their terminology)
back to a handler for processing (say logging in a DB, etc.).
According to their documentation, in C and VB, the registration is a
trivial process of simply supplying the address of the function as the
handler for the callback.
Obviously, this won't work in PHP as a PHP function isn't accessible
like a compiled function from outside of PHP.
The "value" to be supplied is of type VT_I4. This is essentially just
the address of the function (as I see things).
So, I think that a proxy is needed. Something to act in the middle of
the PHP script and the callback invocation by the COM object.
Any ideas?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=49497&edit=1