Get real screen properties.

This commit is contained in:
Vitaly Lipatov 2005-01-05 17:11:33 +00:00 committed by Alexandre Julliard
parent 23b291a642
commit 2dd31728d3
2 changed files with 15 additions and 11 deletions

View File

@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = msi.dll
IMPORTS = shell32 cabinet oleaut32 ole32 version user32 advapi32 kernel32
IMPORTS = shell32 cabinet oleaut32 ole32 version user32 gdi32 advapi32 kernel32
EXTRALIBS = -luuid $(LIBUNICODE)
C_SRCS = \

View File

@ -27,6 +27,7 @@
#include "winreg.h"
#include "winnls.h"
#include "shlwapi.h"
#include "wingdi.h"
#include "wine/debug.h"
#include "msi.h"
#include "msiquery.h"
@ -162,7 +163,8 @@ static VOID set_installer_properties(MSIPACKAGE *package)
WCHAR *ptr;
OSVERSIONINFOA OSVersion;
DWORD verval;
WCHAR verstr[10], msiver[10];
WCHAR verstr[10], bufstr[20];
HDC dc;
static const WCHAR cszbs[]={'\\',0};
static const WCHAR CFF[] =
@ -361,16 +363,18 @@ Privileged
/* just fudge this */
MSI_SetPropertyW(package,szSPL,szSix);
sprintfW( msiver, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION);
MSI_SetPropertyW( package, szVersionMsi, msiver );
sprintfW( bufstr, szFormat2, MSI_MAJORVERSION, MSI_MINORVERSION);
MSI_SetPropertyW( package, szVersionMsi, bufstr );
/* Screen properties. FIXME: need to get correct values from system */
sprintfW( msiver, szScreenFormat, 800);
MSI_SetPropertyW( package, szScreenX, msiver );
sprintfW( msiver, szScreenFormat, 600);
MSI_SetPropertyW( package, szScreenY, msiver );
sprintfW( msiver, szScreenFormat, 24);
MSI_SetPropertyW( package, szColorBits, msiver );
/* Screen properties. */
dc = GetDC(0);
sprintfW( bufstr, szScreenFormat, GetDeviceCaps( dc, HORZRES ) );
MSI_SetPropertyW( package, szScreenX, bufstr );
sprintfW( bufstr, szScreenFormat, GetDeviceCaps( dc, VERTRES ));
MSI_SetPropertyW( package, szScreenY, bufstr );
sprintfW( bufstr, szScreenFormat, GetDeviceCaps( dc, BITSPIXEL ));
MSI_SetPropertyW( package, szColorBits, bufstr );
ReleaseDC(0, dc);
}
UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage)