<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<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></BODY></HTML>