<!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.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Yes. It causes a compiler error in the unit where 
my&nbsp;TCOMObject descendant class is declared which implements the 
functionality of my COM interface. I need to change "safecall" to "stdcall", or 
vice versa,&nbsp;at the end of each method declaration depending on which 
machine I'm compiling on.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I should mention that on the XP machine I imported 
an Office 97 type library into my project, whereas on the Windows 2000 machine I 
imported an&nbsp;Office 2000 type library. So I have 2&nbsp;different project 
files. One on each machine, but the rest of the code is shared. This might sound 
like a strange thing to do, but I have&nbsp;Office 97 installed on&nbsp;my XP 
machine and Office 2000 on the Win 2000 machine. It allows me to compile COM 
objects for Office 97 and Office 2000 (and later Office2003) with the same code 
base. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Todd.</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=robertw@cellect.co.nz href="mailto:robertw@cellect.co.nz">Robert 
  Wilson</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@ns3.123.co.nz 
  href="mailto:delphi@ns3.123.co.nz">NZ Borland Developers Group - Delphi 
  List</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, September 01, 2004 10:35 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [DUG] procedure calling 
  convention</DIV>
  <DIV><BR></DIV><BR><FONT face=sans-serif size=2>Hi Todd</FONT> <BR><FONT 
  face=sans-serif size=2>Does this cause an error, I do similar switching 
  between 2k (work) and xp (home &amp; laptop) but using delphi 7 and com 
  application development..I haven't noticed it doing that. Working from home so 
  can't confirm it this week.</FONT> <BR><BR><FONT face=sans-serif 
  size=2>Cheers</FONT> <BR><FONT face=sans-serif size=2>Robert Wilson</FONT> 
<BR>
  <P><FONT face=Tahoma color=#000080 size=2>IS Developer<B> </B></FONT>
  <P><FONT face=Tahoma color=#000080 size=2><B>Cellect and IT 
  Wholesale</B></FONT> 
  <P><FONT face=Tahoma color=#000080 size=2>Ph: +64 (0) 9 415 4747</FONT> 
  <BR><BR><BR><BR>
  <TABLE width="100%">
    <TBODY>
    <TR vAlign=top>
      <TD>
      <TD><FONT face=sans-serif size=1><B>"Todd Martin" 
        &lt;toddm@slingshot.co.nz&gt;</B></FONT> <BR><FONT face=sans-serif 
        size=1>Sent by: delphi-bounces@ns3.123.co.nz</FONT> 
        <P><FONT face=sans-serif size=1>01/09/2004 10:00 a.m.</FONT> <BR><FONT 
        face=sans-serif size=1>Please respond to Todd Martin; Please respond to 
        NZ Borland Developers Group - &nbsp; &nbsp; &nbsp; &nbsp;Delphi 
        List</FONT> <BR></P>
      <TD><FONT face=Arial size=1>&nbsp; &nbsp; &nbsp; &nbsp; </FONT><BR><FONT 
        face=sans-serif size=1>&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; 
        &nbsp; &nbsp;"NZ Borland Developers Group - Delphi List" 
        &lt;delphi@ns3.123.co.nz&gt;</FONT> <BR><FONT face=sans-serif 
        size=1>&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; 
        &nbsp;</FONT> <BR><FONT face=sans-serif size=1>&nbsp; &nbsp; &nbsp; 
        &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;[DUG] procedure calling 
        convention</FONT></TR></TBODY></TABLE><BR><BR><BR><FONT face=Arial size=2>Hi 
  </FONT><BR><FONT face="Times New Roman" size=3>&nbsp;</FONT> <BR><FONT 
  face=Arial size=2>When I create a COM object application in Delphi 6 under 
  Windows 2000, the object methods are defined as "stdcall" in the type library. 
  However, going through the same process in Delphi 6 on a Windows XP machine 
  defines the methods with the calling convention "safecall".</FONT> <BR><FONT 
  face="Times New Roman" size=3>&nbsp;</FONT> <BR><FONT face=Arial size=2>Since 
  I switch development of the same application between these two machines, this 
  is a pain. Has anyone come across this before? Is there a way to force the 
  type library functions to use one calling convention?</FONT> <BR><FONT 
  face="Times New Roman" size=3>&nbsp;</FONT> <BR><FONT face=Arial 
  size=2>Todd.</FONT><FONT face="Courier New" 
  size=2>_______________________________________________<BR>Delphi mailing 
  list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></FONT><BR><BR>
  <HR>
  <STRONG><FONT color=#ff0000>Attention: </FONT></STRONG><BR>Disclaimer: 
  <P>The information in this electronic mail message is confidential and may be 
  legally privileged. It is intended solely for the addressee. Access to this 
  Internet electronic mail message by anyone else is unauthorised. </P>
  <P>If you are not the intended recipient, any disclosure, copying, 
  distribution or any action taken or omitted to be taken in reliance on it is 
  prohibited and may be unlawful. <BR>If you&nbsp; have received this e-mail by 
  mistake please call the sender immediately on 09 415 4747 and erase the 
  original message and any attachments.</P>
  <P>Cellular Cellnet (NZ) Ltd accepts no responsibility for any effects this 
  email message or attachments has on the recipient network or computer system. 
  <HR>

  <P></P>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Delphi mailing 
  list<BR>Delphi@ns3.123.co.nz<BR>http://ns3.123.co.nz/mailman/listinfo/delphi<BR></BLOCKQUOTE></BODY></HTML>