Hi,
I'm writing a PHP-Module to communicate with a Program written by myself. For this purpose, I use anonymous pipes. Pipe handles are passed through Environment variables.
My Module consists of a few functions. Their implementations check if the module is initialized (if handles are taken out of the environment variables) and if not, they call a special initialisation function which gets the handles out of the variables, duplicates them and put them into global (c-)variables. within that initialisation routine, i can access those pipe handles perfectly, but as soon as the initialisation function has finished, any subsequent WriteFile/ReadFile fails and GetLastError() returns "invalid handle", altough the handle value has not changed...?