pascalabcnet/PABCNetHelp/LangGuide/ProcFunc/external.html

36 lines
1.1 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="external">
</object>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title></title>
<link rel="StyleSheet" href="../../default.css">
</head>
<body>
<H1>Вызов подпрограмм из неуправляемой dll</H1>
<p>Для вызова подпрограммы из неуправляемой dll
(содержащей обычный, а не .NET-код)
используется конструкция вида:</p>
<blockquote>
<p><i>заголовок функции</i><code> <b>external</b>&nbsp;'</code><i>имя dll</i><code>'
<b>name</b>&nbsp;'</code><i>имя функции в dll</i><code>';&nbsp;</code></p>
</blockquote>
<p>Например:</p>
<blockquote>
<p><code><b>function</b> MessageBox(h: integer; m,c: string; t: integer):
integer; <br>
&nbsp; <b>external</b> 'User32.dll' <b>name</b> 'MessageBox';
<br>
...<br>
MessageBox(0,'Hello!','Сообщение',0);<br>
&nbsp;</code></p>
</blockquote>
<p>&nbsp;</p>
</body>
</html>