<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab ( https://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) DIGITEO - Allan CORNET
 *
 * Copyright (C) 2012 - 2016 - Scilab Enterprises
 *
 * This file is hereby licensed under the terms of the GNU GPL v2.0,
 * pursuant to article 5.3.4 of the CeCILL v.2.1.
 * This file was originally licensed under the terms of the CeCILL v2.1,
 * and continues to be available under such terms.
 * For more information, see the COPYING file which you should have received
 * along with this program.
 *
 -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="dllinfo" xml:lang="en">
    <refnamediv>
        <refname>dllinfo</refname>
        <refpurpose>provides information about the format and symbols provided in
            executable and DLL files (Windows).
        </refpurpose>
    </refnamediv>
    <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>infolist = dllinfo(filename,option)</synopsis>
    </refsynopsisdiv>
    <refsection>
        <title>Arguments</title>
        <variablelist>
            <varlistentry>
                <term>filename</term>
                <listitem>
                    <para>a string : a filename .dll or .exe file</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>option</term>
                <listitem>
                    <para>a string : 'machine' , 'exports' , 'imports'</para>
                </listitem>
            </varlistentry>
            <varlistentry>
                <term>infolist</term>
                <listitem>
                    <para>a list :</para>
                    <para>infolist(1) : a string : name of dll or executable.</para>
                    <para>infolist(2) : a string matrix : symbols (imported or exported)
                        or machine type (x86 or x64).
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </refsection>
    <refsection>
        <title>Description</title>
        <para>This tool provides information about the format and symbols
            (imported or exported) provided in executable and DLL files.
        </para>
        <para>This tool is based on dumpbin.exe. A tool provided with Visual
            studio SDK.
        </para>
    </refsection>
    <refsection>
        <title>Examples</title>
        <programlisting role="example"><![CDATA[
if getos() == "Windows" then
  filename = SCI + "\bin\api_scilab.dll";

  dllinfolist = dllinfo(filename, "machine");
  mprintf("Machine destination of %s: %s\n", dllinfolist(1), dllinfolist(2));

  dllinfolist = dllinfo(filename, "imports");
  mprintf("Dlls dependencies of %s:\n", filename);
  for i=1:size(dllinfolist)
    mprintf("%s\n",dllinfolist(i)(1));
  end

  dllinfolist = dllinfo(filename, "exports");
  mprintf("Dll exports of %s:\n", filename);
  disp(dllinfolist);
end
 ]]></programlisting>
    </refsection>
    <refsection role="see also">
        <title>See also</title>
        <simplelist type="inline">
            <member>
                <link linkend="addinter">addinter</link>
            </member>
            <member>
                <link linkend="link">link</link>
            </member>
            <member>
                <link linkend="ilib_compile">ilib_compile</link>
            </member>
            <member>
                <link linkend="ilib_gen_Make">ilib_gen_Make</link>
            </member>
            <member>
                <link linkend="ilib_gen_gateway">ilib_gen_gateway</link>
            </member>
            <member>
                <link linkend="ilib_gen_loader">ilib_gen_loader</link>
            </member>
            <member>
                <link linkend="ilib_for_link">ilib_for_link</link>
            </member>
        </simplelist>
    </refsection>
</refentry>
