mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
bf72af30d0
as is done in the Windows headers. Add #define COBJMACROS where needed in Wine. Fixes the compilation of the oleaut32/tests/olefont.c and urlmon/tests/url.c conformance tests with the Windows headers.
69 lines
1.9 KiB
C
69 lines
1.9 KiB
C
/*
|
|
* OLEFONT test program
|
|
*
|
|
* Copyright 2003 Marcus Meissner
|
|
*
|
|
*
|
|
* 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 <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
#include <float.h>
|
|
#include <time.h>
|
|
|
|
#include <wine/test.h>
|
|
#include <windef.h>
|
|
#include <winbase.h>
|
|
#include <winuser.h>
|
|
#include <wingdi.h>
|
|
#include <winnls.h>
|
|
#include <winerror.h>
|
|
#include <winnt.h>
|
|
|
|
#include <wtypes.h>
|
|
#define COBJMACROS
|
|
#include <olectl.h>
|
|
|
|
static HMODULE hOleaut32;
|
|
|
|
static HRESULT (WINAPI *pOleCreateFontIndirect)(LPFONTDESC,REFIID,LPVOID*);
|
|
|
|
START_TEST(olefont)
|
|
{
|
|
LPVOID pvObj = NULL;
|
|
HRESULT hres;
|
|
IFont* font = NULL;
|
|
|
|
hOleaut32 = LoadLibraryA("oleaut32.dll");
|
|
pOleCreateFontIndirect = (void*)GetProcAddress(hOleaut32, "OleCreateFontIndirect");
|
|
if (!pOleCreateFontIndirect)
|
|
return;
|
|
|
|
hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj);
|
|
font = pvObj;
|
|
|
|
ok(hres == S_OK,"OCFI (NULL,..) does not return 0, but 0x%08lx\n",hres);
|
|
ok(font != NULL,"OCFI (NULL,..) returns NULL, instead of !NULL\n");
|
|
|
|
pvObj = NULL;
|
|
hres = IFont_QueryInterface( font, &IID_IFont, &pvObj);
|
|
|
|
ok(hres == S_OK,"IFont_QI does not return S_OK, but 0x%08lx\n", hres);
|
|
ok(pvObj != NULL,"IFont_QI does return NULL, instead of a ptr\n");
|
|
}
|