Commit aa9dcb42 authored by Alexandre Julliard's avatar Alexandre Julliard

oleaut32/tests: Add tmarshal test.

parent 8c875111
......@@ -383,6 +383,10 @@ dlls/oleaut32/oleaut32.res
dlls/oleaut32/tests/*.ok
dlls/oleaut32/tests/oleaut32_crosstest.exe
dlls/oleaut32/tests/testlist.c
dlls/oleaut32/tests/tmarshal.h
dlls/oleaut32/tests/tmarshal.res
dlls/oleaut32/tests/tmarshal.tlb
dlls/oleaut32/tests/tmarshal_i.c
dlls/olecli.dll16
dlls/olecli32/libolecli32.def
dlls/oledlg/liboledlg.def
......
......@@ -4,18 +4,25 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = oleaut32.dll
IMPORTS = oleaut32 ole32 shlwapi rpcrt4 user32 gdi32 advapi32 kernel32
EXTRALIBS = -luuid
EXTRALIBS = -luuid -luser32
CTESTS = \
olefont.c \
olepicture.c \
safearray.c \
tmarshal.c \
typelib.c \
usrmarshal.c \
varformat.c \
vartest.c \
vartype.c
RC_SRCS = tmarshal.rc
IDL_I_SRCS = tmarshal.idl
IDL_H_SRCS = tmarshal.idl
IDL_TLB_SRCS = tmarshal.idl
@MAKE_TEST_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend
/*
* 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),
helpstring("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);
[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);
}
[
odl,
uuid(a028db06-30f0-4b93-b17a-41c72f831d84),
]
interface INonOleAutomation : IUnknown
{
[id(DISPID_NOA_BSTRRET)]
BSTR BstrRet();
}
[
dllname("comm.drv"),
uuid(d377f60b-8639-4261-8ee7-75c8340d2cc9),
]
module BadModule
{
[
entry("Foo"),
]
HRESULT BadModuleFoo();
};
[
dllname("oleaut32.dll"),
uuid(d377f60c-8639-4261-8ee7-75c8340d2cc9),
]
module BadEntry
{
[
entry("Foo"),
]
HRESULT BadEntryFoo();
};
[
uuid(bb171948-10ec-407a-9a57-2f85f797ff1a),
appobject,
]
coclass ApplicationObject2
{
interface IWidget;
[source] interface IWidget;
};
};
/*
* Resource file for tmarshaltest
*
* Copyright 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 "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#include "wine/wine_common_ver.rc"
1 TYPELIB LOADONCALL DISCARDABLE tmarshal.tlb
/*
* Copyright (C) 2005-2006 Robert Shearman for CodeWeavers
*
* 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
*
*/
#define DISPID_TM_NAME 1
#define DISPID_TM_DOSOMETHING 2
#define DISPID_TM_STATE 3
#define DISPID_TM_MAP 4
#define DISPID_TM_SETOLECOLOR 5
#define DISPID_TM_GETOLECOLOR 6
#define DISPID_TM_CLONE 7
#define DISPID_TM_CLONEDISPATCH 8
#define DISPID_TM_CLONECOCLASS 9
#define DISPID_TM_ARRAY 10
#define DISPID_TM_VARARRAYPTR 11
#define DISPID_TM_VARIANT 12
#define DISPID_TM_ERROR 13
#define DISPID_NOA_BSTRRET 1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment