RV: [omniORB] Managed code in Visual Studio .NET

Josu Larranaga jlarranaga@fatronik.com
Wed Jun 12 14:52:02 2002


--------------050200090809050007060008
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Javier Osa wrote:

>
>
>	Hello,
>
>		I have avoided '_var' type variable problems using '_ptr' type variable
>and when I need to free memory I use CORBA::release(...).
>
>
>
>		I have discovered another problem. After of using _narrow(...) function I
>used to call CORBA::is_nil(...), but now I can't call is_nill(...) function
>because always returns 'true' when it isn't nill.
>
>		Except these problems the rest works well. I use the same OmniORB DLLs
>that I worked on VC6.
>
>		Josu, Have you compiled the OmniORB DLL on VC7?
>
Yes I could, there is an error of redefinition of the struct fd_set, in 
winsock.h and winsock2.h. I hacked the omniORB sources, and i had it 
compiled but  you have better no use VC7
If you use python 2.2 you can compile omni-idl

>
>		Any problems?
>

>
>		What version of OmniORB?
>
4.0

As my knowledge of omniORB architecture and MS run time library is very 
low, i am not sure of what i am going to say, but i think that if you 
have omniORB linked in VC6 you are getting heap memory from msvcrt.dll 
whereas your application linked on VC7 is getting heap memory from 
msvcr70.dll, as long as omniORB architecture reserves memory on the 
omniORB dll, i.e. msvcrt.dll, and by means of the inline, it is freed on 
msvcr70.dll, i don't know how does MS manage this case  

>
>
>	Thanks...
>
>
>	Xavier Osa
>
>
>
>
>
>
>-----Mensaje original-----
>De: omniorb-list-admin@realvnc.com
>[mailto:omniorb-list-admin@realvnc.com]En nombre de Josu Larranaga
>Enviado el: martes, 11 de junio de 2002 11:52
>Para: omniorb
>Asunto: Re: [omniORB] Managed code in Visual Studio .NET
>
>
>Hello,
>
>I didn't success on the port from VC6 to VC7. I tried to use programs
>compiled on VC7 with a VC6 compiled OmniORB dll,
>it had lots of problems on the heap deallocation, some on the ' _var'
>type variable release, some on memory corruption,
>tracing omniORB  tcp packages showed errors, problems when more than 16K
>were exchanged,  etc.
>I didn't pay much attention to it,  as many sources errors were
>identified. In order work out the problem  you should compile omniORB
>first on VC7.
>if you try in usual way you will  get a python.h include definition
>error, so you have better compile python first with VC7. It would be
>nice you could
>have python compiled on managed code.
>
>Javier Osa wrote:
>
>>	I wish to migrate code from VC6 to VC7 in Visual Studio .NET. My proyect
>>
>is
>
>>a client DLL (tccedulacli.dll) that gets a reference of ORB server Object
>>
>>from nameservice and calls one of his methods.
>
>>	I have used a Managed C++ Class Library project because I want to use it
>>
>>from NET components.
>
>>	This DLL runs fine in VC6 but when it runs under VC7 results in exceptions
>>being thrown at run-time ...
>>
>>".....
>>		An unhandled exception of type 'System.TypeLoadException' occurred in
>>tccedulacli.dll
>>		Additional information: Could not load type omniObjectManager from
>>assembly TCCedulaCli, Version=1.0.891.28114, Culture=neutral,
>>PublicKeyToken=null.
>>....."
>>
>>	This exception occurs when the constructor of an '_var' type variable of
>>
>my
>
>>own classes defined in IDL file is called, but doesn`t occurr if the '_var'
>>type variable is Object_var.
>>	Has someone succeeded with ORB clients from Managed code in VS.NET?
>>
>>	Thanks
>>
>>		Xavier Osa
>>
>>
>>_______________________________________________
>>omniORB-list mailing list
>>omniORB-list@realvnc.com
>>http://www.realvnc.com/mailman/listinfo/omniorb-list
>>
>>
>
>
>_______________________________________________
>omniORB-list mailing list
>omniORB-list@realvnc.com
>http://www.realvnc.com/mailman/listinfo/omniorb-list
>
>_______________________________________________
>omniORB-list mailing list
>omniORB-list@realvnc.com
>http://www.realvnc.com/mailman/listinfo/omniorb-list
>
>


--------------050200090809050007060008
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<html>
<head>
</head>
<body>
Javier Osa wrote:<br>
<blockquote type="cite" cite="mid:000201c211dc$1ab19c40$e1d88781@JOB">
  <pre wrap=""><br><br>	Hello,<br><br>		I have avoided '_var' type variable problems using '_ptr' type variable<br>and when I need to free memory I use CORBA::release(...).</pre>
  </blockquote>
  <blockquote type="cite" cite="mid:000201c211dc$1ab19c40$e1d88781@JOB">
    <pre wrap=""><br><br>		I have discovered another problem. After of using _narrow(...) function I<br>used to call CORBA::is_nil(...), but now I can't call is_nill(...) function<br>because always returns 'true' when it isn't nill.<br><br>		Except these problems the rest works well. I use the same OmniORB DLLs<br>that I worked on VC6.<br><br>		Josu, Have you compiled the OmniORB DLL on VC7?</pre>
    </blockquote>
Yes I could, there is an error of redefinition of the struct fd_set, in winsock.h
and winsock2.h. I hacked the omniORB sources, and i had it compiled but &nbsp;you
have better no use VC7<br>
If you use python 2.2 you can compile omni-idl<br>
    <blockquote type="cite" cite="mid:000201c211dc$1ab19c40$e1d88781@JOB">
      <pre wrap=""><br>		Any problems?</pre>
      </blockquote>
      <br>
      <blockquote type="cite" cite="mid:000201c211dc$1ab19c40$e1d88781@JOB">
        <pre wrap=""><br>		What version of OmniORB?</pre>
        </blockquote>
4.0<br>
        <br>
As my knowledge of omniORB architecture and MS run time library is very low,
i am not sure of what i am going to say, but i think that if you have omniORB
linked in VC6 you are getting heap memory from msvcrt.dll whereas your application
linked on VC7 is getting heap memory from msvcr70.dll, as long as omniORB
architecture reserves memory on the omniORB dll, i.e. msvcrt.dll, and by
means of the inline, it is freed on msvcr70.dll, i don't know how does MS
manage this case &nbsp; <br>
        <blockquote type="cite" cite="mid:000201c211dc$1ab19c40$e1d88781@JOB">
          <pre wrap=""><br><br>	Thanks...<br><br><br>	Xavier Osa<br><br><br><br><br><br><br>-----Mensaje original-----<br>De: <a class="moz-txt-link-abbreviated" href="mailto:omniorb-list-admin@realvnc.com">omniorb-list-admin@realvnc.com</a><br>[<a class="moz-txt-link-freetext" href="mailto:omniorb-list-admin@realvnc.com">mailto:omniorb-list-admin@realvnc.com</a>]En nombre de Josu Larranaga<br>Enviado el: martes, 11 de junio de 2002 11:52<br>Para: omniorb<br>Asunto: Re: [omniORB] Managed code in Visual Studio .NET<br><br><br>Hello,<br><br>I didn't success on the port from VC6 to VC7. I tried to use programs<br>compiled on VC7 with a VC6 compiled OmniORB dll,<br>it had lots of problems on the heap deallocation, some on the ' _var'<br>type variable release, some on memory corruption,<br>tracing omniORB  tcp packages showed errors, problems when more than 16K<br>were exchanged,  etc.<br>I didn't pay much attention to it,  as many sources errors were<br>identified. In order work 
out the problem  you should compile omniORB<br>first on VC7.<br>if you try in usual way you will  get a python.h include definition<br>error, so you have better compile python first with VC7. It would be<br>nice you could<br>have python compiled on managed code.<br><br>Javier Osa wrote:<br><br></pre>
          <blockquote type="cite">
            <pre wrap="">	I wish to migrate code from VC6 to VC7 in Visual Studio .NET. My proyect<br></pre>
            </blockquote>
            <pre wrap=""><!---->is<br></pre>
            <blockquote type="cite">
              <pre wrap="">a client DLL (tccedulacli.dll) that gets a reference of ORB server Object<br></pre>
              </blockquote>
              <pre wrap=""><!---->&gt;from nameservice and calls one of his methods.<br></pre>
              <blockquote type="cite">
                <pre wrap="">	I have used a Managed C++ Class Library project because I want to use it<br></pre>
                </blockquote>
                <pre wrap=""><!---->&gt;from NET components.<br></pre>
                <blockquote type="cite">
                  <pre wrap="">	This DLL runs fine in VC6 but when it runs under VC7 results in exceptions<br>being thrown at run-time ...<br><br>".....<br>		An unhandled exception of type 'System.TypeLoadException' occurred in<br>tccedulacli.dll<br>		Additional information: Could not load type omniObjectManager from<br>assembly TCCedulaCli, Version=1.0.891.28114, Culture=neutral,<br>PublicKeyToken=null.<br>....."<br><br>	This exception occurs when the constructor of an '_var' type variable of<br></pre>
                  </blockquote>
                  <pre wrap=""><!---->my<br></pre>
                  <blockquote type="cite">
                    <pre wrap="">own classes defined in IDL file is called, but doesn`t occurr if the '_var'<br>type variable is Object_var.<br>	Has someone succeeded with ORB clients from Managed code in VS.NET?<br><br>	Thanks<br><br>		Xavier Osa<br><br><br>_______________________________________________<br>omniORB-list mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:omniORB-list@realvnc.com">omniORB-list@realvnc.com</a><br><a class="moz-txt-link-freetext" href="http://www.realvnc.com/mailman/listinfo/omniorb-list">http://www.realvnc.com/mailman/listinfo/omniorb-list</a><br><br><br></pre>
                    </blockquote>
                    <pre wrap=""><!----><br><br>_______________________________________________<br>omniORB-list mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:omniORB-list@realvnc.com">omniORB-list@realvnc.com</a><br><a class="moz-txt-link-freetext" href="http://www.realvnc.com/mailman/listinfo/omniorb-list">http://www.realvnc.com/mailman/listinfo/omniorb-list</a><br><br>_______________________________________________<br>omniORB-list mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:omniORB-list@realvnc.com">omniORB-list@realvnc.com</a><br><a class="moz-txt-link-freetext" href="http://www.realvnc.com/mailman/listinfo/omniorb-list">http://www.realvnc.com/mailman/listinfo/omniorb-list</a><br><br><br></pre>
                    </blockquote>
                    <br>
                    </body>
                    </html>

--------------050200090809050007060008--