外部関数の定義【External functions definition】

The type of external functions defined in another component of a program must be explicitly described. The absence of such a definition may result in errors during the compilation, linkage, or execution of the program. While describing an external object, the keyword of #import must be used with the reference to the module.

プログラムの別の構成要素で定義された外部関数の型は、明示的に記述する必要があります。このような定義の欠如は、コンパイル、リンケージ、またはプログラムの実行中にエラーとなる可能性があります。外部オブジェクトを記述すると同時に、#import のキーワードをモジュールへの参照として使用する必要があります。

 

Import can be used to easily describe functions called from external DLLs or compiled EX4 libraries.

インポートを使用すると、外部DLLや、コンパイルされた EX4 ライブラリから呼び出した機能を容易に記述することができます。

Pointers to variables can be passed to imported dll functions. Data of the string type are passed as a pointer to the corresponding memory block (one should keep in mind that internal representation of string data consists of two parts: the memory block length and the memory block pointer). If there is a need to pass data of the int or double type, then the one-dimensional array of the corresponding type should be passed by reference as a parameter.

変数へのポインタは、インポートされた DLL関数に渡すことができます。文字列型のデータはポインタとしては、対応するメモリ ブロックに渡されます。(1つの文字列データの内部表現には、2つの部分から構成されていることに注意する必要があります。メモリ ブロックの長さと、メモリ ブロックへのポインタです) もし、int 型か double 型のデータを渡す必要がある場合は、対応する型の1次元配列をパラメータとして参照渡しする必要があります。

Examples:

例:

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">