From: cascade Date: Mon, 28 Aug 2006 12:12:02 +0000 (+0000) Subject: compilation error correction cdl, cxx X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=bc1a5188ff081e668d7d825a5effc8ccd229cc33;p=occt-wok.git compilation error correction cdl, cxx --- diff --git a/src/WOKNT/WOKNT_MixedOutput.cdl b/src/WOKNT/WOKNT_MixedOutput.cdl index 18d5660..75e7962 100755 --- a/src/WOKNT/WOKNT_MixedOutput.cdl +++ b/src/WOKNT/WOKNT_MixedOutput.cdl @@ -22,7 +22,7 @@ private class MixedOutput from WOKNT inherits ShellOutput from WOKNT ---Purpose: dummy method to be used in derived class ---C++: alias ~ - OpenStdOut ( me : out ) returns Integer from Standard is redefined static; + OpenStdOut ( me : out ) returns Address 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 @@ -30,7 +30,7 @@ private class MixedOutput from WOKNT inherits ShellOutput from WOKNT CloseStdOut ( me : out ) is redefined static; ---Purpose: closes write end of the 'STDOUT' pipe - OpenStdErr ( me : out ) returns Integer from Standard is virtual; + OpenStdErr ( me : out ) returns Address 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 @@ -63,7 +63,7 @@ private class MixedOutput from WOKNT inherits ShellOutput from WOKNT fields - myOutHandle : Integer from Standard is protected; + myOutHandle : Address from Standard is protected; myStdOut : HSequenceOfHAsciiString from TColStd is protected; end MixedOutput; diff --git a/src/WOKNT/WOKNT_MixedOutput.cxx b/src/WOKNT/WOKNT_MixedOutput.cxx index c21390f..f60b114 100755 --- a/src/WOKNT/WOKNT_MixedOutput.cxx +++ b/src/WOKNT/WOKNT_MixedOutput.cxx @@ -14,7 +14,7 @@ void __fastcall _WOKNT_clear_pipe ( HANDLE DWORD __fastcall _WOKNT_nb_to_read ( HANDLE ); Handle( TColStd_HSequenceOfHAsciiString ) __fastcall _WOKNT_read_pipe ( OSD_File*, HANDLE ); void __fastcall _WOKNT_create_pipe ( - Standard_Size*, Standard_Integer* + Standard_Address*, Standard_Address* ); WOKNT_MixedOutput :: WOKNT_MixedOutput () { @@ -28,9 +28,9 @@ void WOKNT_MixedOutput :: Cleanup () { } // end WOKNT_MixedOutput :: Cleanup -Standard_Integer WOKNT_MixedOutput :: OpenStdOut () { +Standard_Address WOKNT_MixedOutput :: OpenStdOut () { - _WOKNT_create_pipe ( &myFileChannel, &myOutHandle ); + _WOKNT_create_pipe ((Standard_Address *)&myFileChannel, &myOutHandle); myIO |= ( FLAG_PIPE | FLAG_READ_PIPE ); return myOutHandle; @@ -42,13 +42,13 @@ void WOKNT_MixedOutput :: CloseStdOut () { if ( ( HANDLE )myOutHandle != INVALID_HANDLE_VALUE ) { CloseHandle ( ( HANDLE )myOutHandle ); - myOutHandle = ( Standard_Integer )INVALID_HANDLE_VALUE; + myOutHandle = (Standard_Address) INVALID_HANDLE_VALUE; } // end if } // end WOKNT_MixedOutput :: CloseStdOut -Standard_Integer WOKNT_MixedOutput :: OpenStdErr () { +Standard_Address WOKNT_MixedOutput :: OpenStdErr () { return ( ( HANDLE )myOutHandle == INVALID_HANDLE_VALUE ) ? OpenStdOut () : myOutHandle; @@ -171,10 +171,15 @@ Handle( TColStd_HSequenceOfHAsciiString ) __fastcall _WOKNT_read_pipe ( } // end _WOKNT_read_pipe -void __fastcall _WOKNT_create_pipe ( - Standard_Size* readPipe, Standard_Integer* writePipe - ) { - +//======================================================================= +//function : _WOKNT_create_pipe +//purpose : +//======================================================================= + +void __fastcall _WOKNT_create_pipe (Standard_Address* readPipe, + Standard_Address* writePipe) +{ + SECURITY_ATTRIBUTES sa; sa.nLength = sizeof ( SECURITY_DESCRIPTOR ); // structure size @@ -187,7 +192,7 @@ void __fastcall _WOKNT_create_pipe ( &sa, // protection/inheritance 4096 // buffer size ) - ) *writePipe = ( Standard_Integer )INVALID_HANDLE_VALUE; + ) *writePipe = ( Standard_Address )INVALID_HANDLE_VALUE; } // end _WOKNT_create_pipe #endif diff --git a/src/WOKNT/WOKNT_OutErrOutput.cdl b/src/WOKNT/WOKNT_OutErrOutput.cdl index 3ac8983..d3638ce 100755 --- a/src/WOKNT/WOKNT_OutErrOutput.cdl +++ b/src/WOKNT/WOKNT_OutErrOutput.cdl @@ -22,7 +22,7 @@ private class OutErrOutput from WOKNT inherits MixedOutput from WOKNT ---Purpose: closes read end of the 'STDERR' handle ---C++: alias ~ - OpenStdErr ( me : out ) returns Integer from Standard is redefined static; + OpenStdErr ( me : out ) returns Address 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 @@ -46,8 +46,8 @@ private class OutErrOutput from WOKNT inherits MixedOutput from WOKNT fields - myErrHandleR : Integer from Standard; - myErrHandleW : Integer from Standard; + myErrHandleR : Address from Standard; + myErrHandleW : Address from Standard; myStdErr : HSequenceOfHAsciiString from TColStd; end OutErrOutput; diff --git a/src/WOKNT/WOKNT_OutErrOutput.cxx b/src/WOKNT/WOKNT_OutErrOutput.cxx index f862bb2..1463c41 100755 --- a/src/WOKNT/WOKNT_OutErrOutput.cxx +++ b/src/WOKNT/WOKNT_OutErrOutput.cxx @@ -11,7 +11,7 @@ void __fastcall _WOKNT_clear_pipe ( HANDLE DWORD __fastcall _WOKNT_nb_to_read ( HANDLE ); Handle( TColStd_HSequenceOfHAsciiString ) __fastcall _WOKNT_read_pipe ( OSD_File*, HANDLE ); void __fastcall _WOKNT_create_pipe ( - Standard_Integer*, Standard_Integer* + Standard_Address*, Standard_Address* ); WOKNT_OutErrOutput :: WOKNT_OutErrOutput () { @@ -26,7 +26,7 @@ void WOKNT_OutErrOutput :: Cleanup () { if ( ( HANDLE )myErrHandleR != INVALID_HANDLE_VALUE ) { CloseHandle ( ( HANDLE )myErrHandleR ); - myErrHandleR = ( Standard_Integer )INVALID_HANDLE_VALUE; + myErrHandleR = (Standard_Address) INVALID_HANDLE_VALUE; } // end if @@ -34,7 +34,7 @@ void WOKNT_OutErrOutput :: Cleanup () { } // end WOKNT_OutErrOutput :: Cleanup -Standard_Integer WOKNT_OutErrOutput :: OpenStdErr () { +Standard_Address WOKNT_OutErrOutput :: OpenStdErr () { _WOKNT_create_pipe ( &myErrHandleR, &myErrHandleW ); myIO |= ( FLAG_PIPE | FLAG_READ_PIPE ); @@ -48,7 +48,7 @@ void WOKNT_OutErrOutput :: CloseStdErr () { if ( ( HANDLE )myErrHandleW != INVALID_HANDLE_VALUE ) { CloseHandle ( ( HANDLE )myErrHandleW ); - myErrHandleW = ( Standard_Integer )INVALID_HANDLE_VALUE; + myErrHandleW = ( Standard_Address )INVALID_HANDLE_VALUE; } // end if @@ -65,12 +65,11 @@ void WOKNT_OutErrOutput :: Clear () { Handle( TColStd_HSequenceOfHAsciiString ) WOKNT_OutErrOutput :: Errors () { Handle( TColStd_HSequenceOfHAsciiString ) retVal; - Standard_Integer handle; + const Standard_Size handle (myFileChannel); - handle = myFileChannel; - myFileChannel = myErrHandleR; + myFileChannel = (Standard_Size) myErrHandleR; - retVal = _WOKNT_read_pipe ( this, ( HANDLE )myFileChannel ); + retVal = _WOKNT_read_pipe ( this, ( HANDLE )myErrHandleR ); myFileChannel = handle; diff --git a/src/WOKNT/WOKNT_ShellOutput.cdl b/src/WOKNT/WOKNT_ShellOutput.cdl index c385792..38bd77e 100755 --- a/src/WOKNT/WOKNT_ShellOutput.cdl +++ b/src/WOKNT/WOKNT_ShellOutput.cdl @@ -30,7 +30,7 @@ private deferred class ShellOutput from WOKNT inherits File from OSD Errors ( me : out ) returns HSequenceOfHAsciiString from TColStd is deferred; ---Purpose: returns standard error output of sub-process - OpenStdOut ( me : out ) returns Integer from Standard is deferred; + OpenStdOut ( me : out ) returns Address 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 @@ -38,7 +38,7 @@ private deferred class ShellOutput from WOKNT inherits File from OSD CloseStdOut ( me : out ) is deferred; ---Purpose: closes an I/O object's handle opened by 'OpenStdOut' method - OpenStdErr ( me : out ) returns Integer from Standard is deferred; + OpenStdErr ( me : out ) returns Address 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