PHP subscribe to C# dll events
Posted: Tue Oct 04, 2011 3:02 am
Hi there,
I have a PHP script that loads a C# dll file. This is working fine as I can call methods and access properties of the C# class.
For example:
But I am trying to subscribe to events in a C# class. I have done some research and googling, but I can't seem to find a solution for it.
I want the C# code to somehow execute a PHP function when an event is raised or executed in the C# class.
I can't seem to get my head around it. How can I accomplish this? Maybe pass some sort of callback function as a parameter to the class or something like that?
Any help or ideas would be greatly appreciated.
Thanks,
Cheers
I have a PHP script that loads a C# dll file. This is working fine as I can call methods and access properties of the C# class.
For example:
Code: Select all
$obj = new COM("TestProject.DoesStuff");
$result = $obj->ReturnQWERTY();
I want the C# code to somehow execute a PHP function when an event is raised or executed in the C# class.
I can't seem to get my head around it. How can I accomplish this? Maybe pass some sort of callback function as a parameter to the class or something like that?
Any help or ideas would be greatly appreciated.
Thanks,
Cheers