Salome HOME
Fix compilation pb.
[modules/kernel.git] / src / Registry / RegistryService.cxx
index 8aed1d77fe959abf52e7056c2226a024bb4b9e75..52a3d1e9a75423b7ec2d9e44958d6291eed12e93 100644 (file)
@@ -17,7 +17,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -35,7 +35,11 @@ extern "C"
 # include <time.h>
 }
 
+#ifndef WNT
 #include <unistd.h>
+#else
+#include <process.h>
+#endif
 using namespace std;
 
 /* ------------------------------*/
@@ -45,7 +49,7 @@ using namespace std;
 RegistryService::RegistryService( void ) : _SessionName(0), _Compteur(0)
 {
        MESSAGE("Passage dans RegistryService::RegistryService()") ;
-
+       _orb = CORBA::ORB::_nil();
 }
 
 
@@ -70,7 +74,11 @@ RegistryService::~RegistryService()
        _Compteur = -1 ;
        if ( _SessionName )
        {
+#ifndef WNT
                delete [] _SessionName ;
+#else
+               delete [] (char*)_SessionName ;
+#endif
                _SessionName = 0 ;
        }
        END_OF("RegistryService::~RegistryService()") ;
@@ -104,8 +112,11 @@ CORBA::ULong RegistryService::add( const Registry::Infos & infos )
        return (CORBA::ULong)_Compteur ;
 }
 
-
+#ifndef WNT
 void RegistryService::remove( const CORBA::ULong id)
+#else
+void RegistryService::remove( CORBA::ULong id)
+#endif
 {
        BEGIN_OF("RegistryService::remove") ;
        SCRUTE(id) ;
@@ -129,8 +140,11 @@ void RegistryService::remove( const CORBA::ULong id)
 }
 
 
-
+#ifndef WNT
 void RegistryService::hello( const CORBA::ULong id )
+#else
+void RegistryService::hello( CORBA::ULong id )
+#endif
 {
        BEGIN_OF("RegistryService::hello") ;
        SCRUTE(id) ;
@@ -245,5 +259,14 @@ void RegistryService::SessionName( const char *sessionName )
 }
 void RegistryService::ping()
 {
+#ifndef WNT
   MESSAGE(" RegistryService::ping() pid "<< getpid());
+#else
+  MESSAGE(" RegistryService::ping() pid "<< _getpid());
+#endif
+}
+
+CORBA::Long RegistryService::getPID()
+{
+  return (CORBA::Long)getpid();
 }