---Purpose: dummy method to be used in derived class
---C++: alias ~
- OpenStdOut ( me : out ) returns Address from Standard is redefined static;
+ OpenStdOut ( me : out ) returns Integer from Standard is redefined static;
---Purpose: creates a pipe for reading a standard output of sub-process
-- and returns a pipe handle.
-- Warning: returns INVALID_HANDLE_VALUE in case of failure
CloseStdOut ( me : out ) is redefined static;
---Purpose: closes write end of the 'STDOUT' pipe
- OpenStdErr ( me : out ) returns Address from Standard is virtual;
+ OpenStdErr ( me : out ) returns Integer from Standard is virtual;
---Purpose: creates a pipe for reading a standard error output of sub-process
-- and returns a pipe handle
-- Warning: this method is simply calling 'OpenStdOut' method
fields
- myOutHandle : Address from Standard is protected;
+ myOutHandle : Integer from Standard is protected;
myStdOut : HSequenceOfHAsciiString from TColStd is protected;
end MixedOutput;
DWORD __fastcall _WOKNT_nb_to_read ( HANDLE );
Handle( TColStd_HSequenceOfHAsciiString ) __fastcall _WOKNT_read_pipe ( OSD_File*, HANDLE );
void __fastcall _WOKNT_create_pipe (
- Standard_Address*, Standard_Address*
+ Standard_Integer*, Standard_Integer*
);
WOKNT_MixedOutput :: WOKNT_MixedOutput () {
} // end WOKNT_MixedOutput :: Cleanup
-Standard_Address WOKNT_MixedOutput :: OpenStdOut () {
+Standard_Integer WOKNT_MixedOutput :: OpenStdOut () {
- _WOKNT_create_pipe ((Standard_Address *)&myFileChannel, &myOutHandle);
+ _WOKNT_create_pipe ( &myFileChannel, &myOutHandle );
myIO |= ( FLAG_PIPE | FLAG_READ_PIPE );
return myOutHandle;
if ( ( HANDLE )myOutHandle != INVALID_HANDLE_VALUE ) {
CloseHandle ( ( HANDLE )myOutHandle );
- myOutHandle = (Standard_Address) INVALID_HANDLE_VALUE;
+ myOutHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
} // end if
} // end WOKNT_MixedOutput :: CloseStdOut
-Standard_Address WOKNT_MixedOutput :: OpenStdErr () {
+Standard_Integer WOKNT_MixedOutput :: OpenStdErr () {
return ( ( HANDLE )myOutHandle == INVALID_HANDLE_VALUE ) ?
OpenStdOut () : myOutHandle;
} // end _WOKNT_read_pipe
-//=======================================================================
-//function : _WOKNT_create_pipe
-//purpose :
-//=======================================================================
-
-void __fastcall _WOKNT_create_pipe (Standard_Address* readPipe,
- Standard_Address* writePipe)
-{
-
+void __fastcall _WOKNT_create_pipe (
+ Standard_Integer* readPipe, Standard_Integer* writePipe
+ ) {
+
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof ( SECURITY_DESCRIPTOR ); // structure size
&sa, // protection/inheritance
4096 // buffer size
)
- ) *writePipe = ( Standard_Address )INVALID_HANDLE_VALUE;
+ ) *writePipe = ( Standard_Integer )INVALID_HANDLE_VALUE;
} // end _WOKNT_create_pipe
#endif
---Purpose: closes read end of the 'STDERR' handle
---C++: alias ~
- OpenStdErr ( me : out ) returns Address from Standard is redefined static;
+ OpenStdErr ( me : out ) returns Integer from Standard is redefined static;
---Purpose: creates a pipe for reading a standard error output of sub-process
-- and returns a pipe handle
-- Warning: returns INVALID_HANDLE_VALUE in case of failure
fields
- myErrHandleR : Address from Standard;
- myErrHandleW : Address from Standard;
+ myErrHandleR : Integer from Standard;
+ myErrHandleW : Integer from Standard;
myStdErr : HSequenceOfHAsciiString from TColStd;
end OutErrOutput;
DWORD __fastcall _WOKNT_nb_to_read ( HANDLE );
Handle( TColStd_HSequenceOfHAsciiString ) __fastcall _WOKNT_read_pipe ( OSD_File*, HANDLE );
void __fastcall _WOKNT_create_pipe (
- Standard_Address*, Standard_Address*
+ Standard_Integer*, Standard_Integer*
);
WOKNT_OutErrOutput :: WOKNT_OutErrOutput () {
if ( ( HANDLE )myErrHandleR != INVALID_HANDLE_VALUE ) {
CloseHandle ( ( HANDLE )myErrHandleR );
- myErrHandleR = (Standard_Address) INVALID_HANDLE_VALUE;
+ myErrHandleR = ( Standard_Integer )INVALID_HANDLE_VALUE;
} // end if
} // end WOKNT_OutErrOutput :: Cleanup
-Standard_Address WOKNT_OutErrOutput :: OpenStdErr () {
+Standard_Integer WOKNT_OutErrOutput :: OpenStdErr () {
_WOKNT_create_pipe ( &myErrHandleR, &myErrHandleW );
myIO |= ( FLAG_PIPE | FLAG_READ_PIPE );
if ( ( HANDLE )myErrHandleW != INVALID_HANDLE_VALUE ) {
CloseHandle ( ( HANDLE )myErrHandleW );
- myErrHandleW = ( Standard_Address )INVALID_HANDLE_VALUE;
+ myErrHandleW = ( Standard_Integer )INVALID_HANDLE_VALUE;
} // end if
Handle( TColStd_HSequenceOfHAsciiString ) WOKNT_OutErrOutput :: Errors () {
Handle( TColStd_HSequenceOfHAsciiString ) retVal;
- const Standard_Size handle (myFileChannel);
+ Standard_Integer handle;
- myFileChannel = (Standard_Size) myErrHandleR;
+ handle = myFileChannel;
+ myFileChannel = myErrHandleR;
- retVal = _WOKNT_read_pipe ( this, ( HANDLE )myErrHandleR );
+ retVal = _WOKNT_read_pipe ( this, ( HANDLE )myFileChannel );
myFileChannel = handle;
Errors ( me : out ) returns HSequenceOfHAsciiString from TColStd is deferred;
---Purpose: returns standard error output of sub-process
- OpenStdOut ( me : out ) returns Address from Standard is deferred;
+ OpenStdOut ( me : out ) returns Integer from Standard is deferred;
---Purpose: creates an I/O object for reading a standard output of sub-process
-- and returns this object handle.
-- Warning: returns INVALID_HANDLE_VALUE in case of failure
CloseStdOut ( me : out ) is deferred;
---Purpose: closes an I/O object's handle opened by 'OpenStdOut' method
- OpenStdErr ( me : out ) returns Address from Standard is deferred;
+ OpenStdErr ( me : out ) returns Integer from Standard is deferred;
---Purpose: creates an I/O object for reading a standard error output of sub-process
-- and returns this object handle
-- Warning: returns INVALID_HANDLE_VALUE in case of failure