Windows< sys/file.h>相等的 [英] Windows <sys/file.h> equivalent
问题描述
是否有一个与Linux头文件等效的Win32?我正在Linux到Windows的端口上工作(这是我第一次这样做),并且此文件失败.
Is there a Win32 equivalent to the linux header file? I'm working on a Linux to Windows port (and my first time doing so) and it's failing on this file.
推荐答案
编写WIN32API应用程序时,通常#include <windows.h>
-在应用程序中包括大多数Windows API.如果您需要减少其中的一些内容,则#define WIN32_LEAN_AND_MEAN
会清除Windows库中一些较晦涩的内容.
When writing WIN32API apps you usually #include <windows.h>
- that includes most of the Windows API in your application. If you need to cut down on some of those includes, #define WIN32_LEAN_AND_MEAN
will wipe out some of the more obscure things from the Windows libraries.
您要转换什么功能?可能是在WIN32上使用其他功能的情况.它与Linux/Unix/POSIX完全不同.
What functions are you trying to convert? It'll probably be a case of using a different function on WIN32; it is very different to Linux/Unix/POSIX.
示例: ReadFile()
在一般概念上,功能大致相当于 read()
,但调用签名却大不相同. ReadFile()的MSDN条目说:
Example: the ReadFile()
function is roughly equivalent to read()
in terms of general idea, but the calling signatures are very different. ReadFile()'s MSDN entry says:
标题:WinBase.h(包括Windows.h)
Header: WinBase.h (include Windows.h)
这篇关于Windows< sys/file.h>相等的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!