On 6/5/06, Dan Kegel <[EMAIL PROTECTED]> wrote:
James wrote:
> Is there anything wrong with this patch?
Well, it doesn't have a conformance test...
The test would require us to have an idl file compiled by widl. The
attached file is a part of the initial type marshalling tests written
by Rob Shearman. The idl file can't be compiled by widl until many
more features of widl are implemented.
On 6/5/06, Robert Shearman <[EMAIL PROTECTED]> wrote:
Note: it's going to take a lot more work before widl can generate a
typelib from this IDL. There are unimplemented features blocking it,
like widl being unable to express pointers correctly and not being able
to process importlibs.
One option is to compile the idl with midl and add the resulting
output files to git, but I don't know if Alexandre will accept this.
--
James Hawkins
/*
* Copyright (C) 2005 Robert Shearman
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include "tmarshal_dispids.h"
import "ocidl.idl";
[
uuid(d96d8a3e-78b6-4c8d-8f27-059db959be8a),
version(1.0),
help_string("Test Typelib")
]
library TestTypelib
{
importlib("stdole2.tlb");
typedef enum tagSTATE
{
STATE_UNWIDGETIFIED = 1,
STATE_WIDGETIFIED
} STATE;
coclass ApplicationObject2;
[
odl,
uuid(a1f8cae3-c947-4c5f-b57d-c87b9b5f3586),
oleautomation,
dual
]
interface IWidget : IDispatch
{
[propput, id(DISPID_TM_NAME)]
HRESULT Name([in] BSTR name);
[propget, id(DISPID_TM_NAME)]
HRESULT Name([out, retval] BSTR *name);
[id(DISPID_TM_DOSOMETHING)]
HRESULT DoSomething([in] double number, [out] BSTR *str1, [in, defaultvalue("")] BSTR str2, [in, optional] VARIANT *opt);
[propget, id(DISPID_TM_STATE)]
HRESULT State([out, retval] STATE *state);
[propput, id(DISPID_TM_STATE)]
HRESULT State([in] STATE state);
[id(DISPID_TM_MAP)]
HRESULT Map([in] BSTR bstrId, [out, retval] BSTR *sValue);
[id(DISPID_TM_SETOLECOLOR)]
HRESULT SetOleColor([in] OLE_COLOR val);
[id(DISPID_TM_GETOLECOLOR)]
HRESULT GetOleColor([out, retval] OLE_COLOR *pVal);
[propget, id(DISPID_TM_CLONE)]
HRESULT Clone([out, retval] IWidget **ppVal);
[propget, id(DISPID_TM_CLONEDISPATCH)]
HRESULT CloneDispatch([out, retval] IDispatch **ppVal);
[propget, id(DISPID_TM_CLONECOCLASS)]
HRESULT CloneCoclass([out, retval] ApplicationObject2 **ppVal);
[propget, id(DISPID_VALUE)]
HRESULT Value([in] VARIANT *value, [out, retval] VARIANT *retval);
[id(DISPID_TM_ARRAY)]
HRESULT Array([in] SAFEARRAY(BSTR) values);
[id(DISPID_TM_VARARRAYPTR)]
HRESULT VariantArrayPtr([in] SAFEARRAY(VARIANT) *values);
[id(DISPID_TM_VARIANT)]
void Variant([in] VARIANT var);
[id(DISPID_TM_ERROR)]
HRESULT Error();
}
[
odl,
uuid(a028db05-30f0-4b93-b17a-41c72f831d84),
dual,
oleautomation
]
interface IKindaEnumWidget : IUnknown
{
HRESULT Next([out] IWidget **widget);
HRESULT Count([out] unsigned long *count);
HRESULT Reset();
HRESULT Clone([out] IKindaEnumWidget **ppenum);
}
[
uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
appobject,
]
coclass ApplicationObject2
{
interface IWidget;
[source] interface IWidget;
};
};