2 * tests for Microsoft Installer functionality
4 * Copyright 2005 Mike McCormack for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "wine/test.h"
28 typedef INSTALLSTATE (WINAPI *fnMsiUseFeatureExA)(LPCSTR, LPCSTR ,DWORD, DWORD );
29 fnMsiUseFeatureExA pMsiUseFeatureExA;
31 static void test_usefeature(void)
35 if (!pMsiUseFeatureExA)
38 r = MsiQueryFeatureState(NULL,NULL);
39 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
41 r = MsiQueryFeatureState("{9085040-6000-11d3-8cfe-0150048383c9}" ,NULL);
42 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
44 r = MsiUseFeatureExA(NULL,NULL,0,0);
45 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
47 r = MsiUseFeatureExA(NULL,
48 "WORDVIEWFiles", -2, 1 );
49 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
51 r = MsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}",
53 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
55 r = MsiUseFeatureExA("{9085040-6000-11d3-8cfe-0150048383c9}",
56 "WORDVIEWFiles", -2, 0 );
57 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
59 r = MsiUseFeatureExA("{0085040-6000-11d3-8cfe-0150048383c9}",
60 "WORDVIEWFiles", -2, 0 );
61 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
63 r = MsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}",
64 "WORDVIEWFiles", -2, 1 );
65 ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
71 HMODULE hmod = GetModuleHandle("msi.dll");
72 pMsiUseFeatureExA = (fnMsiUseFeatureExA)
73 GetProcAddress(hmod, "MsiUseFeatureExA");