开发者

MIDL doesn't want me to define a HRESULT-less function!

I'm writing a custom ATL ActiveX component, but I'm having this little weeny problem: Visual S开发者_高级运维tudio insists that every function defines in the *.idl file has to have a HRESULT return type, even though I want to have a ULONG return type.

[id(3), helpstring("method addh3h3")] ULONG addh3h3([in] ULONG x, [in] ULONG y);

It gives me this error:

error MIDL2269 : procedures in an object interface must return an HRESULT 

So how do I go on about defining a function with a ULONG return type? My ultimate goal is to call this function of the ActiveX object from within JavaScript in a webpage.

Thank you for your time!


Add the [local] attribute to either the interface or the method. (from http://support.microsoft.com/kb/192626).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜