编译时出现
G:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\urlmon.idl(1314) : error MIDL2025 : syntax error : expecting a type specification near "HANDLE_PTR"
G:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\urlmon.idl(1315) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
执行 midl.exe 时出错.我应该怎么办呢?urlmon.idl就是vc自带的那个,vc自带的文件也会有问题吗?
顺便问一下,谁有带IDownloadManager接口的tlb文件?请给个下载地址,多谢附上downloadmgr.idl代码:
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright 1995-2000 Microsoft Corporation. All Rights Reserved.
//
//--------------------------------------------------------------------------cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// downloadmgr.h")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// (C) Copyright 2000 Microsoft Corporation. All Rights Reserved.")
cpp_quote("//")
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
cpp_quote("// PARTICULAR PURPOSE.")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("")
cpp_quote("//---------------------------------------------------------------------------=")
cpp_quote("// Internet Explorer Download Manager Interfaces")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// GUIDS")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// {988934A4-064B-11D3-BB80-00104B35E7F9}")
cpp_quote("DEFINE_GUID(IID_IDownloadManager, 0x988934a4, 0x064b, 0x11d3, 0xbb, 0x80, 0x0, 0x10, 0x4b, 0x35, 0xe7, 0xf9);")
cpp_quote("#define SID_SDownloadManager IID_IDownloadManager")#ifndef DO_NO_IMPORTS
import "unknwn.idl";
import "ocidl.idl";
import "oleidl.idl";
import "oaidl.idl";
#endif
interface IDownloadManager;
[
helpstring("IDownloadManager interface"),
object,
uuid(988934A4-064B-11D3-BB80-00104B35E7F9), // IID_IDownloadManager
pointer_default(unique),
local
]
interface IDownloadManager : IUnknown
{
HRESULT Download(
[in] IMoniker *pmk, // Identifies the object to be downloaded
[in] IBindCtx *pbc, // Stores information used by the moniker to bind
[in] DWORD dwBindVerb, // The action to be performed during the bind
[in] LONG grfBINDF, // Determines the use of URL encoding during the bind
[in] BINDINFO *pBindInfo, // Used to implement IBindStatusCallback::GetBindInfo
[in] LPCOLESTR pszHeaders, // Additional headers to use with IHttpNegotiate
[in] LPCOLESTR pszRedir, // The URL that the moniker is redirected to
[in] UINT uiCP // The code page of the object's display name
);
};
G:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\urlmon.idl(1314) : error MIDL2025 : syntax error : expecting a type specification near "HANDLE_PTR"
G:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\INCLUDE\urlmon.idl(1315) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
执行 midl.exe 时出错.我应该怎么办呢?urlmon.idl就是vc自带的那个,vc自带的文件也会有问题吗?
顺便问一下,谁有带IDownloadManager接口的tlb文件?请给个下载地址,多谢附上downloadmgr.idl代码:
//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright 1995-2000 Microsoft Corporation. All Rights Reserved.
//
//--------------------------------------------------------------------------cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// downloadmgr.h")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("// (C) Copyright 2000 Microsoft Corporation. All Rights Reserved.")
cpp_quote("//")
cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED \"AS IS\" WITHOUT WARRANTY OF")
cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
cpp_quote("// PARTICULAR PURPOSE.")
cpp_quote("//=--------------------------------------------------------------------------=")
cpp_quote("")
cpp_quote("#pragma comment(lib,\"uuid.lib\")")
cpp_quote("")
cpp_quote("//---------------------------------------------------------------------------=")
cpp_quote("// Internet Explorer Download Manager Interfaces")
cpp_quote("")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// GUIDS")
cpp_quote("// --------------------------------------------------------------------------------")
cpp_quote("// {988934A4-064B-11D3-BB80-00104B35E7F9}")
cpp_quote("DEFINE_GUID(IID_IDownloadManager, 0x988934a4, 0x064b, 0x11d3, 0xbb, 0x80, 0x0, 0x10, 0x4b, 0x35, 0xe7, 0xf9);")
cpp_quote("#define SID_SDownloadManager IID_IDownloadManager")#ifndef DO_NO_IMPORTS
import "unknwn.idl";
import "ocidl.idl";
import "oleidl.idl";
import "oaidl.idl";
#endif
interface IDownloadManager;
[
helpstring("IDownloadManager interface"),
object,
uuid(988934A4-064B-11D3-BB80-00104B35E7F9), // IID_IDownloadManager
pointer_default(unique),
local
]
interface IDownloadManager : IUnknown
{
HRESULT Download(
[in] IMoniker *pmk, // Identifies the object to be downloaded
[in] IBindCtx *pbc, // Stores information used by the moniker to bind
[in] DWORD dwBindVerb, // The action to be performed during the bind
[in] LONG grfBINDF, // Determines the use of URL encoding during the bind
[in] BINDINFO *pBindInfo, // Used to implement IBindStatusCallback::GetBindInfo
[in] LPCOLESTR pszHeaders, // Additional headers to use with IHttpNegotiate
[in] LPCOLESTR pszRedir, // The URL that the moniker is redirected to
[in] UINT uiCP // The code page of the object's display name
);
};
解决方案 »
- 求助:关于获取线程输出写入文本的问题
- ARX 文档切换?
- VC桌面应用程序架构设计问题?如何做到数据与显示控件分离?
- 滚动条的最大滚动范围
- ADODB::Streams对象操作.
- 菜鸟求救:ADO接口访问MS SQL数据库时生成的有关类
- listen 的socket close前有没有必要shutdown()?
- 看完并理解《深入浅出MFC》第八章的兄弟进来(关于Document-View)
- 高分求救:WriteProcessMemory调用失败,系统错误码183?
- 请教,WTL众在继承类中重载OnMouseMove怎么调用出错了
- vc6编制的ADO连接SQL2K程序的控件是那个?
- MFC中怎样屏蔽编辑框的右键菜单?怎样让编辑框内容显示不下时,出现垂直滚动条?
因为错误提示"expecting a type specification near "HANDLE_PTR" ",说明编译器不认识HANDLE_PTR,请Include含有HANDLE_PTR声明的文件,然后再试试.
GOOD LUCK.
就行了。
你好,用了你的方法,不提示之前的错误了,可又出现了新的错误:
G:\Program Files\Microsoft Visual Studio\VC98\Include\UrlMon.Idl(1940) : error MIDL2025 : syntax error : expecting a type specification near "DWORD_PTR"
G:\Program Files\Microsoft Visual Studio\VC98\Include\UrlMon.Idl(1941) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
该怎么办呢?
能否说一说编译idl文件的过程和需要哪些设置?