试试在你程序的头文件中声明一下:
extern STDAPI CIMakeICommand( ICommand ** ppCommand,
ULONG cScope,
DWORD const * aDepths,
WCHAR const * const * awcsScope,
WCHAR const * const * awcsCatalogs,
WCHAR const * const * awcsMachine );
extern STDAPI CIMakeICommand( ICommand ** ppCommand,
ULONG cScope,
DWORD const * aDepths,
WCHAR const * const * awcsScope,
WCHAR const * const * awcsCatalogs,
WCHAR const * const * awcsMachine );
#include <ntquery.h>
#define __oledb_h__
#include <ntquery.h>
放到stdafx.h
#include "oledb.h"
#include "ntquery.h"
不过还是谢谢大家