<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="../Fmethod_xsl/fmethod_he_c.xsl"?>

<root>
  <func>
    <title>cnc_exeprgname</title>


    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_exeprgname(unsigned short FlibHndl, ODBEXEPRG *exeprg);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
            <p>Reads program name of the program which is being currently selected in CNC.
               <br/>The program name is stored in "execprg.name" with maximum 32 character string format.</p>
            <li>In case of program of O number</li>
            <table class="dd">
                <tr>
                    <td>exeprg.name</td>
                    <td>:</td>
                    <td>'O' and the number are stored with ASCII code, for example, "O123".</td>
                </tr>
                <tr>
                    <td>exeprg.o_num</td>
                    <td>:</td>
                    <td>The O number are stored with binary format, for example, 123.</td>
                </tr>
            </table>
            <br/>
            <li>In case of program of except O number</li>
            <table class="dd">
                <tr>
                    <td>exeprg.name</td>
                    <td>:</td>
                    <td>The program name is stored with ASCII code, for example, "ABC".</td>
                </tr>
                <tr>
                    <td>exeprg.o_num</td>
                    <td>:</td>
                    <td>0 is stored with binary format.</td>
                </tr>
            </table>
        </cmn>
    </doc>



    <argument>
        <common>
            <vc>
                <item>
                    <name>FlibHndl</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the library handle. See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                        </p>
                    </content>
                </item>
                <item>
                    <name>exeprg</name>
                    <type>out</type>
                    <content>
                        <p>
                            Pointer to the ODBEXEPRG structure including the program name being executed.<br/>
                            The ODBEXEPRG structure is as follows.
<pre>
typedef struct odbexeprg {
    char  name[36] ;   /* the program name being executed */
    long  o_num ;      /* the program number being executed */
} ODBEXEPRG ;
</pre>
                        </p>
                    </content>
                </item>
            </vc>
        </common>
    </argument>



    <errcode>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
        <ethr><p>The Ethernet function and the extended driver/library function are necessary.</p>
              <p>However, in case of Series 300i, the required CNC option is as follows.</p>
              <p>When Embedded Ethernet is used,</p>
              <p><ul>above two optional functions are not required.</ul></p>
              <p>When Ethernet board is used,</p>
              <p><ul>only Ethernet function is required.</ul></p>
        </ethr>
    </option>



    <parameter></parameter>



    <mode></mode>



    <support>
        <m>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>O</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>O</fs30i>
        </t>
        <lc>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>X</fs30i>
        </lc>
        <p>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </p>
        <l>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </w>
        <pw>
            <d>X</d>
            <h>X</h>
        </pw>

        <is>
            <m>
                <fs30is>O</fs30is>
            </m>
            <t>
                <fs30is>O</fs30is>
            </t>
        </is>
    </support>



    <reference></reference>



    <example></example>



  </func>
</root>
