71 lines
2.4 KiB
HTML
71 lines
2.4 KiB
HTML
<html>
|
|
<head>
|
|
<link rel=stylesheet type="text/css" href="styles.css">
|
|
</head>
|
|
<body>
|
|
<H2>
|
|
paxCompiler for Delphi. Support of dll-defined functions written in Microsoft Visual Studio C++.
|
|
</H2>
|
|
<hr>
|
|
|
|
<blockquote>
|
|
|
|
<pre>
|
|
<font color="blue"><b>type</b></font>
|
|
PMyPoint = ^TMyPoint;
|
|
TMyPoint = <font color="blue"><b>record</b></font>
|
|
x, y, z: Integer;
|
|
<font color="blue"><b>end</b></font>;
|
|
|
|
// int __msfastcall cube(int num);
|
|
<font color="blue"><b>function</b></font> cub(X: Integer): Integer; <font color="blue"><b>msfastcall</b></font>;
|
|
<font color="blue"><b>external</b></font> <font color="Red">'CppDll.dll'</font> name <font color="Red">'cube'</font>;
|
|
|
|
// double __msfastcall arr(double a[], int i, int j, float f);
|
|
<font color="blue"><b>function</b></font> arr(A: Pointer; X, Y: Integer; S: Single): Double; <font color="blue"><b>msfastcall</b></font>;
|
|
<font color="blue"><b>external</b></font> <font color="Red">'CppDll.dll'</font>;
|
|
|
|
// Point __msfastcall ret_struct(int x, int y, int z);
|
|
<font color="blue"><b>function</b></font> ret_struct(X, Y, Z: Integer): TMyPoint; <font color="blue"><b>msfastcall</b></font>;
|
|
<font color="blue"><b>external</b></font> <font color="Red">'CppDll.dll'</font>;
|
|
|
|
// MyPoint __msfastcall pass_struct(const MyPoint & q);
|
|
<font color="blue"><b>function</b></font> pass_struct(P: PMyPoint): TMyPoint; <font color="blue"><b>msfastcall</b></font>;
|
|
<font color="blue"><b>external</b></font> <font color="Red">'CppDll.dll'</font>;
|
|
|
|
// char __msfastcall ret_char(char * s)
|
|
<font color="blue"><b>function</b></font> ret_char(s: PChar): Char; <font color="blue"><b>msfastcall</b></font>;
|
|
<font color="blue"><b>external</b></font> <font color="Red">'CppDll.dll'</font>;
|
|
|
|
<font color="blue"><b>var</b></font>
|
|
p: TMyPoint;
|
|
a: <font color="blue"><b>array</b></font>[0..5] <font color="blue"><b>of</b></font> double;
|
|
<font color="blue"><b>begin</b></font>
|
|
a[0] := 5.3;
|
|
a[1] := 10.1;
|
|
|
|
writeln(cub(2));
|
|
writeln(arr(@a, 2, 3, 6.8));
|
|
|
|
p := ret_struct(2, 3, 5);
|
|
writeln(p.x, <font color="Red">' '</font>, p.y, <font color="Red">' '</font>, p.z);
|
|
|
|
p := pass_struct(@p);
|
|
writeln(p.x, <font color="Red">' '</font>, p.y, <font color="Red">' '</font>, p.z);
|
|
|
|
writeln(ret_char(<font color="Red">'abc'</font>));
|
|
<font color="blue"><b>end</b></font>.
|
|
</pre>
|
|
</blockquote>
|
|
|
|
|
|
|
|
<p>
|
|
<HR>
|
|
<font size = 1 color ="gray">
|
|
Copyright © 2006-2009
|
|
VIRT Laboratory. All rights reserved.
|
|
</font>
|
|
</body>
|
|
</html>
|