VC2005:① 可以纯API编程(SDK)吗? ② 编译后在2000/XP上,是否需要附带DLL?该如何处理

VC2005:① 可以纯API编程(SDK)吗? ② 编译后在2000/XP上,是否需要附带DLL?
问题:①   可以纯API编程(SDK)吗?   ②   编译后在2000/XP上,是否需要附带DLL?

目的:用VS2005,开发可以在没有安装.Net上的2000/XP/2003下正常运行的软件,且要求不用附带多余的DLL。

如果VS2005不行,VS2003是否可以?

只用过VC,请指点,谢谢!

------解决方案--------------------
可以,不需要
------解决方案--------------------
一個例子(以Windows SDK爲例):
這個是比較新的函數GetDllDirectory的穩當

GetDllDirectory
Retrieves the application-specific portion of the search path used to locate DLLs for the application.

DWORD WINAPI GetDllDirectory(
DWORD nBufferLength,
LPTSTR lpBuffer
);

Parameters
nBufferLength
[in] The size of the output buffer, in characters.
lpBuffer
[out] A pointer to a buffer that receives the application-specific portion of the search path.
Return Value
If the function succeeds, the return value is the length of the string copied to lpBuffer, in characters, not including the terminating null character. If the return value is greater than nBufferLength, it specifies the size of the buffer required for the path.
If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks
To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, see Using the Windows Headers.

Requirements
Client Requires Windows Vista or Windows XP SP1.
Server Requires Windows Server "Longhorn " or Windows Server 2003.
Header Declared in Winbase.h; include Windows.h.

Library Use Kernel32.lib.

DLL Requires Kernel32.dll.
Unicode Implemented as GetDllDirectoryW (Unicode) and GetDllDirectoryA (ANSI).


See Also
Dynamic-Link Library Search Order
SetDllDirectory


Send comments about this topic to Microsoft

Build date: 10/2/2006
Requirements
Client Requires Windows Vista or Windows XP SP1.
Server Requires Windows Server "Longhorn " or Windows Server 2003.
Header Declared in Winbase.h; include Windows.h.

Library Use Kernel32.lib.

DLL Requires Kernel32.dll.
Unicode Implemented as GetDllDirectoryW (Unicode) and GetDllDirectoryA (ANSI).

See Also
Dynamic-Link Library Search Order
SetDllDirectory

------------------------------------------------

在最後的Requirements部分 指明了
Client Requires Windows Vista or Windows XP SP1.
Server Requires Windows Server "Longhorn " or Windows Server 2003.
那就是説 Vista\WinXP SP1\Win Server Longhorn\Win server 2003都附帶了導出這一函數的DLL