<DIV>Cheers Jeremey. </DIV>
<DIV>&nbsp;</DIV>
<DIV>I just downloaded Delphi 2005 Architect trial and compared a simple Win32 app with the equivalent ASP.Net app.&nbsp; It seems that I can share business&nbsp;object code (as long as it doesn't use .Net or Win32 specific libraries), but not presentation/form code (which I expected).</DIV>
<DIV>&nbsp;</DIV>
<DIV>-Sulav<BR><BR><B><I>JeremyN@frontiersoftware.com.au</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2>Sure it is possible.&nbsp; However, getting it to be the exact source might not be possible.&nbsp; For instance if you use the RECT function, it is declared in the Types unit for .NET.&nbsp; Also hInstance is in WinUtils in .NET.</FONT></SPAN></DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2>There are other considerations as well but it is possible.&nbsp; I actually have a popup message notification component that works in both win32 and .NET with 2 changes for .NET.&nbsp; WinUtils and Types are included when compiled under .NET plus I added a function called PChar so that I could still use PChar typecasts in my drawing code without having to modify the parameter lists.&nbsp; Some functions parameters are different.&nbsp; Such as the DrawText API function, which instead of taking PChars in .NET, now takes strings.</FONT></SPAN></DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2>Also if you PostMessage and SendMessage with objects or pointers to text you will need to get cosy with marshalling (not a biggie once you do it a couple of times) and there are also VCL methods to help out.&nbsp; Although one had a bug in Delphi 8 and I haven't checked in D2005 yet.&nbsp; (Actually that just reminded me!).</FONT></SPAN></DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2>HTH,</FONT></SPAN></DIV>
<DIV><SPAN class=584400800-01122004><FONT face=Arial color=#0000ff size=2>Jeremy</FONT></SPAN></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Sulav Giri [mailto:sulav_giri@yahoo.com]<BR><B>Sent:</B> 1 December 2004 7:46 AM<BR><B>To:</B> NZ Borland Developers Group - Delphi List<BR><B>Subject:</B> [DUG] Delphi for .Net question<BR><BR></FONT></DIV>
<P>Hi folks,</P>
<P>Does anyone know if it is possible to compile a Win32 app and a .Net app using the same Object Pascal source in Delphi 8 or Delphi 2005?</P>
<P>Cheers,</P>
<P>Sulav</P>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR><A href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</A> - You care about security. So do we.</BLOCKQUOTE>_______________________________________________<BR>Delphi mailing list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - You care about security. So do we.