]>
Commit | Line | Data |
---|---|---|
53668523 L |
1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r |
2 | <html lang="en">\r | |
3 | <head>\r | |
4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">\r | |
5 | <meta http-equiv="Content-Style-Type" content="text/css">\r | |
6 | <link rel="up" title="FatFs" href="../00index_e.html">\r | |
7 | <link rel="alternate" hreflang="ja" title="Japanese" href="../ja/getlabel.html">\r | |
8 | <link rel="stylesheet" href="../css_e.css" type="text/css" media="screen" title="ELM Default">\r | |
9 | <title>FatFs - f_getlabel</title>\r | |
10 | </head>\r | |
11 | \r | |
12 | <body>\r | |
13 | \r | |
14 | <div class="para func">\r | |
15 | <h2>f_getlabel</h2>\r | |
16 | <p>The f_getlabel function returns volume label and volume serial number of a drive.</p>\r | |
17 | <pre>\r | |
18 | FRESULT f_getlabel (\r | |
19 | const TCHAR* <span class="arg">path</span>, <span class="c">/* [IN] Drive number */</span>\r | |
20 | TCHAR* <span class="arg">label</span>, <span class="c">/* [OUT] Volume label */</span>\r | |
21 | DWORD* <span class="arg">vsn</span> <span class="c">/* [OUT] Volume serial number */</span>\r | |
22 | );\r | |
23 | </pre>\r | |
24 | </div>\r | |
25 | \r | |
26 | <div class="para arg">\r | |
27 | <h4>Parameters</h4>\r | |
28 | <dl class="par">\r | |
29 | <dt>path</dt>\r | |
30 | <dd>Pointer to the null-terminated string that specifies the <a href="filename.html">logical drive</a>. Null-string specifies the default drive.</dd>\r | |
31 | <dt>label</dt>\r | |
70702af1 | 32 | <dd>Pointer to the buffer to store the volume label. The buffer size must be at least 24 items at <tt>_LFN_UNICODE == 0</tt> or 12 items at <tt>_LFN_UNICODE == 1</tt>. If the volume has no label, a null-string will be returned. Set null pointer if this information is not needed.</dd>\r |
53668523 L |
33 | <dt>vsn</dt>\r |
34 | <dd>Pointer to the <tt>DWORD</tt> variable to store the volume serial number. Set null pointer if this information is not needed.</dd>\r | |
35 | </dl>\r | |
36 | </div>\r | |
37 | \r | |
38 | \r | |
39 | <div class="para ret">\r | |
40 | <h4>Return Values</h4>\r | |
41 | <p>\r | |
42 | <a href="rc.html#ok">FR_OK</a>,\r | |
43 | <a href="rc.html#de">FR_DISK_ERR</a>,\r | |
44 | <a href="rc.html#ie">FR_INT_ERR</a>,\r | |
45 | <a href="rc.html#nr">FR_NOT_READY</a>,\r | |
46 | <a href="rc.html#id">FR_INVALID_DRIVE</a>,\r | |
47 | <a href="rc.html#ne">FR_NOT_ENABLED</a>,\r | |
48 | <a href="rc.html#ns">FR_NO_FILESYSTEM</a>,\r | |
49 | <a href="rc.html#tm">FR_TIMEOUT</a>\r | |
50 | </p>\r | |
51 | </div>\r | |
52 | \r | |
53 | \r | |
54 | <div class="para comp">\r | |
55 | <h4>QuickInfo</h4>\r | |
56 | <p>Available when <tt>_USE_LABEL == 1</tt>.</p>\r | |
57 | </div>\r | |
58 | \r | |
59 | \r | |
60 | <div class="para use">\r | |
61 | <h4>Example</h4>\r | |
62 | <pre>\r | |
70702af1 | 63 | char str[24];\r |
53668523 L |
64 | \r |
65 | <span class="c">/* Get volume label of the default drive */</span>\r | |
66 | f_getlabel("", str, 0);\r | |
67 | \r | |
68 | <span class="c">/* Get volume label of the drive 2 */</span>\r | |
69 | f_getlabel("2:", str, 0);\r | |
70 | </pre>\r | |
71 | </div>\r | |
72 | \r | |
73 | \r | |
74 | <div class="para ref">\r | |
75 | <h4>See Also</h4>\r | |
76 | <tt><a href="setlabel.html">f_setlabel</a></tt>\r | |
77 | </div>\r | |
78 | \r | |
79 | \r | |
80 | <p class="foot"><a href="../00index_e.html">Return</a></p>\r | |
81 | </body>\r | |
82 | </html>\r |