DLL: различия между версиями
Содержимое удалено Содержимое добавлено
ЕссБот (обсуждение | вклад) м →[[w:Visual Basic|Visual Basic]]: установка шаблона "по алфавиту" по консенсусу на форуме с помощью AWB |
DannyS712 (обсуждение | вклад) м <source> -> <syntaxhighlight> (phab:T237267) |
||
Строка 5:
==== [[Delphi]] ====
<
library Example;
Строка 21:
begin
end.
</syntaxhighlight>
==== [[Язык Си в примерах|C]] и [[Си++|C++]] ====
<
#include <windows.h>
Строка 54:
return a + b;
}
</syntaxhighlight>
Пример компиляции абстрактных файлов a.cpp и b.cpp в res.dll из командной строки при помощи [[w:GCC|GCC]]:
<
g++ -c a.cpp -o a.o
g++ -c b.cpp -o b.o
dllwrap a.o b.o -o res.dll
del a.o b.o
</syntaxhighlight>
=== Импорт из DLL ===
==== [[Delphi]] ====
<
program Example;
{$APPTYPE CONSOLE}
Строка 80:
Writeln('The result was: ', result)
end.
</syntaxhighlight>
==== [[Язык Си в примерах|C]] и [[Си++|C++]] ====
<
#include <stdio.h>
Строка 99:
return 0;
}
</syntaxhighlight>
==== [[w:Visual Basic|Visual Basic]] ====
Строка 107:
==== [[Delphi]] ====
<
program Example;
{$APPTYPE CONSOLE}
Строка 128:
end;
end.
</syntaxhighlight>
==== [[Язык Си в примерах|C]] и [[Си++|C++]] ====
<
#include <windows.h>
#include <stdio.h>
Строка 174:
return 0;
}
</syntaxhighlight>
==== [[w:Visual Basic|Visual Basic]] ====
<
Option Explicit
Строка 190:
Debug.Print "The result was: " & Result
End Sub
</syntaxhighlight>
{{Темы|Программирование}}
|