⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_39763.htm

📁 vc
💻 HTM
字号:
<p>
序号:39763 发表者:蓝蜻蜓 发表日期:2003-05-13 16:03:40
<br>主题:win32的函数说明哪里可以找到
<br>内容:msdn中似乎没有
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:无量 回复日期:2003-05-13 16:15:18
<br>内容:在http://www.microsoft.com/msdownload/platformsdk/sdkupdate/下载,MS Platform SDK包就有你要的信息。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:很土 回复日期:2003-05-13 16:16:48
<br>内容:怎么会没有<BR>MSDN除了个别几个函数的确是找不到之外.(MS没有公布文档)<BR>其他基本上都会有.<BR>除非你的MSDN版本过于老旧.<BR>你要找什么函数,帮你看看<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:碧落 回复日期:2003-05-13 16:26:56
<br>内容:你去网上找照windows API大全这本书,里面说的很详细。<BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:蓝蜻蜓 回复日期:2003-05-13 16:51:32
<br>内容:GetFileSize<BR>这个函数只有申明,没有详细说明
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:很土 回复日期:2003-05-13 17:06:42
<br>内容:Platform SDK: Storage <BR>GetFileSize<BR><BR>The GetFileSize function retrieves the size of a specified file.<BR><BR>This function stores the file size in a DWORD value. To retrieve a file size that is larger than a DWORD value, use the GetFileSizeEx function.<BR><BR><BR>DWORD GetFileSize(<BR>&nbsp;&nbsp;HANDLE hFile,<BR>&nbsp;&nbsp;LPDWORD lpFileSizeHigh<BR>);<BR><BR>Parameters<BR>hFile <BR>[in] Handle to the file whose size is to be returned. This handle must have been created with either the GENERIC_READ or GENERIC_WRITE access right. For more information, see File Security and Access Rights. <BR>lpFileSizeHigh <BR>[out] Pointer to the variable where the high-order word of the file size is returned. This parameter can be NULL if the application does not require the high-order word. <BR>Return Values<BR>If the function succeeds, the return value is the low-order doubleword of the file size, and, if lpFileSizeHigh is non-NULL, the function puts the high-order doubleword of the file size into the variable pointed to by that parameter.<BR><BR>If the function fails and lpFileSizeHigh is NULL, the return value is INVALID_FILE_SIZE. To get extended error information, call GetLastError.<BR><BR>If the function fails and lpFileSizeHigh is non-NULL, the return value is INVALID_FILE_SIZE and GetLastError will return a value other than NO_ERROR. <BR><BR>Remarks<BR>You cannot use the GetFileSize function with a handle of a nonseeking device such as a pipe or a communications device. To determine the file type for hFile, use the GetFileType function.<BR><BR>The GetFileSize function retrieves the uncompressed size of a file. Use the GetCompressedFileSize function to obtain the compressed size of a file.<BR><BR>Example Code <BR>Note that if the return value is INVALID_FILE_SIZE and lpFileSizeHigh is non-NULL, an application must call GetLastError to determine whether the function has succeeded or failed. The following sample code illustrates this point:<BR><BR>// Case One: calling the function with <BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpFileSizeHigh == NULL <BR> <BR>// Try to obtain hFile's size <BR>dwSize = GetFileSize (hFile, NULL) ; <BR> <BR>// If we failed ... <BR>if (dwSize == INVALID_FILE_SIZE) <BR>{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;// Obtain the error code. <BR>&nbsp;&nbsp;&nbsp;&nbsp;dwError = GetLastError() ; <BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;// Deal with that failure. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;} // End of error handler <BR> <BR> <BR>// <BR>// Case Two: calling the function with <BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lpFileSizeHigh != NULL <BR> <BR>// Try to obtain hFile's huge size. <BR>dwSizeLow = GetFileSize (hFile, &amp; dwSizeHigh) ; <BR> <BR>// If we failed ... <BR>if (dwSizeLow == INVALID_FILE_SIZE <BR>&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;(dwError = GetLastError()) != NO_ERROR )<BR>{ <BR>&nbsp;&nbsp;&nbsp;&nbsp;// Deal with that failure. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR>&nbsp;&nbsp;&nbsp;&nbsp;. <BR> <BR>&nbsp;&nbsp;&nbsp;&nbsp;} // End of error handler.<BR>For another example, see Examining Data Within a Mapped View.<BR><BR>Requirements<BR>Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95.<BR>Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server.<BR>Header: Declared in Winbase.h; include Windows.h.<BR>Library: Use Kernel32.lib.<BR><BR><BR>See Also<BR>File Management Functions, GetCompressedFileSize, GetFileSizeEx, GetFileType<BR><BR><BR><BR><BR>就这个了.你的MSDN的版本有点旧了. 兄弟,我的是(April 2003)版本的<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:蓝蜻蜓 回复日期:2003-05-13 20:21:13
<br>内容:谢谢楼上的兄弟了,很详细
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -