<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>I believe you are perfectly capable of finding this, but fyi:<BR>
<BR><A href="http://msdn2.microsoft.com/en-us/library/ms633558.aspx">http://msdn2.microsoft.com/en-us/library/ms633558.aspx</A><BR>
<BR>HWND WindowFromPoint(POINT Point);<BR>
<BR><A href="http://msdn2.microsoft.com/en-us/library/ms536119(VS.85).aspx">http://msdn2.microsoft.com/en-us/library/ms536119(VS.85).aspx</A><BR>
<BR>typedef struct tagPOINT { <BR> LONG x; <BR> LONG y; <BR>} POINT, *PPOINT;<BR>
<BR>
<A href="http://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/win32/WinUser.i3?rev=1.2;content-type=text%2Fplain">http://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/win32/WinUser.i3?rev=1.2;content-type=text%2Fplain</A><BR>
<BR><*EXTERNAL WindowFromPoint:WINAPI*><BR>PROCEDURE WindowFromPoint (Point: POINT): HWND;<BR>
<BR><A href="http://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/win32/WinDef.i3">http://dcvs.elegosoft.com/cgi-bin/cvsweb.cgi/cm3/m3-libs/m3core/src/win32/WinDef.i3</A><BR>
<BR> POINT = RECORD<BR> x: LONG;<BR> y: LONG;<BR> END;<BR>
<BR>so 8 byte structs are passed by value.<BR>Other small sizes might be an issue as well.<BR>
<BR>Oh..<BR>
<BR>//#pragma pack(1) made no difference <BR>
<BR>#define X(n) typedef struct { char a[n]; } A ## n; void __stdcall F ## n( A##n a) { }<BR>
<BR>X(1) X(2) X(3) X(4) X(5) X(6) X(7) X(8)<BR>X(9) X(10) X(11) X(12) X(13) X(14) X(15)<BR>X(16) X(17) X(18) X(19) X(20) X(30) X(90)<BR>X(900) X(901) X(902)<BR>
<BR>Y:\>link /dump /symbols t.obj<BR>
<BR>Dump of file t.obj<BR>
<BR>COFF SYMBOL TABLE<BR>008 00000000 SECT3 notype () External | <A href="mailto:_F1@4">_F1@4</A><BR>009 00000010 SECT3 notype () External | <A href="mailto:_F2@4">_F2@4</A><BR>00A 00000020 SECT3 notype () External | <A href="mailto:_F3@4">_F3@4</A><BR>00B 00000030 SECT3 notype () External | <A href="mailto:_F4@4">_F4@4</A><BR>00C 00000040 SECT3 notype () External | <A href="mailto:_F5@8">_F5@8</A><BR>00D 00000050 SECT3 notype () External | <A href="mailto:_F6@8">_F6@8</A><BR>00E 00000060 SECT3 notype () External | <A href="mailto:_F7@8">_F7@8</A><BR>00F 00000070 SECT3 notype () External | <A href="mailto:_F8@8">_F8@8</A><BR>010 00000080 SECT3 notype () External | <A href="mailto:_F9@12">_F9@12</A><BR>011 00000090 SECT3 notype () External | <A href="mailto:_F10@12">_F10@12</A><BR>012 000000A0 SECT3 notype () External | <A href="mailto:_F11@12">_F11@12</A><BR>013 000000B0 SECT3 notype () External | <A href="mailto:_F12@12">_F12@12</A><BR>014 000000C0 SECT3 notype () External | <A href="mailto:_F13@16">_F13@16</A><BR>015 000000D0 SECT3 notype () External | <A href="mailto:_F14@16">_F14@16</A><BR>016 000000E0 SECT3 notype () External | <A href="mailto:_F15@16">_F15@16</A><BR>017 000000F0 SECT3 notype () External | <A href="mailto:_F16@16">_F16@16</A><BR>018 00000100 SECT3 notype () External | <A href="mailto:_F17@20">_F17@20</A><BR>019 00000110 SECT3 notype () External | <A href="mailto:_F18@20">_F18@20</A><BR>01A 00000120 SECT3 notype () External | <A href="mailto:_F19@20">_F19@20</A><BR>01B 00000130 SECT3 notype () External | <A href="mailto:_F20@20">_F20@20</A><BR>01C 00000140 SECT3 notype () External | <A href="mailto:_F30@32">_F30@32</A><BR>01D 00000150 SECT3 notype () External | <A href="mailto:_F90@92">_F90@92</A><BR>01E 00000160 SECT3 notype () External | <A href="mailto:_F900@900">_F900@900</A><BR>01F 00000170 SECT3 notype () External | <A href="mailto:_F901@904">_F901@904</A><BR>020 00000180 SECT3 notype () External | <A href="mailto:_F902@904">_F902@904</A><BR>
<BR>so, really, pass by value is pass by value, no matter the size.<BR>Round struct sizes up to a multiple of 4 (or word size, but this naming stuff and multiple calling conventions is only x86).<BR>
I thought beyond some small number they'd be passed by pointer and the callee would copy to its local stack..which /might/ still be the case, but it's not how the function naming works at least. I'll check what the code should and does look like.<BR>
<BR> - Jay<BR><BR><BR>
<HR id=stopSpelling>
<BR>
> From: hosking@cs.purdue.edu<BR>> <BR>> > Oh, m3ui and related are broken due to:<BR>> ><BR>> > -> linking formsedit.exe<BR>> > WinTrestle.m3:1843: undefined reference to `WindowFromPoint@4'<BR>> ><BR>> > \mingw\bin\nm \MinGW\lib\libuser32.a | findstr WindowFromPoint<BR>> > 00000000 T _WindowFromPoint@8<BR>> > 00000000 I __imp__WindowFromPoint@8<BR>> ><BR>> > Maybe Tony will fix my __stdcall work. :)<BR>> <BR>> Yes, I know what needs doing to m3cc(cm3cg). Just need to do it.<BR><BR><br /><hr />Make distant family not so distant with Windows Vista® + Windows Live™. <a href='http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TXT_TAGLM_CPC_VideoChat_distantfamily_012008' target='_new'>Start now!</a></body>
</html>