Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
eb0e0df9
Commit
eb0e0df9
authored
Jun 30, 2004
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start implementing MsiOpenPackage.
parent
de8674ec
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
178 deletions
+7
-178
Makefile.in
dlls/msi/Makefile.in
+1
-0
action.c
dlls/msi/action.c
+0
-0
cond.y
dlls/msi/cond.y
+1
-3
msi.c
dlls/msi/msi.c
+4
-175
msipriv.h
dlls/msi/msipriv.h
+1
-0
package.c
dlls/msi/package.c
+0
-0
No files found.
dlls/msi/Makefile.in
View file @
eb0e0df9
...
...
@@ -15,6 +15,7 @@ C_SRCS = \
msi.c
\
msiquery.c
\
order.c
\
package.c
\
record.c
\
regsvr.c
\
select
.c
\
...
...
dlls/msi/action.c
View file @
eb0e0df9
This diff is collapsed.
Click to expand it.
dlls/msi/cond.y
View file @
eb0e0df9
...
...
@@ -449,11 +449,9 @@ symbol_s:
$$ = HeapAlloc( GetProcessHeap(), 0, 0x100*sizeof (WCHAR) );
/* Lookup the identifier */
/* This will not really work until we have write access to the table*/
/* HACK ALERT HACK ALERT... */
sz=0x100;
if (
get_property
(cond->hInstall,$1,$$,&sz) != ERROR_SUCCESS)
if (
MsiGetPropertyW
(cond->hInstall,$1,$$,&sz) != ERROR_SUCCESS)
{
$$[0]=0;
}
...
...
dlls/msi/msi.c
View file @
eb0e0df9
...
...
@@ -375,32 +375,6 @@ end:
return
r
;
}
UINT
WINAPI
MsiOpenPackageA
(
LPCSTR
szPackage
,
MSIHANDLE
*
phPackage
)
{
FIXME
(
"%s %p
\n
"
,
debugstr_a
(
szPackage
),
phPackage
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiOpenPackageW
(
LPCWSTR
szPackage
,
MSIHANDLE
*
phPackage
)
{
UINT
rc
;
FIXME
(
"%s %p
\n
"
,
debugstr_w
(
szPackage
),
phPackage
);
rc
=
MsiOpenDatabaseW
(
szPackage
,
MSIDBOPEN_READONLY
,
phPackage
);
return
rc
;
}
UINT
WINAPI
MsiOpenPackageExA
(
LPCSTR
szPackage
,
DWORD
dwOptions
,
MSIHANDLE
*
phPackage
)
{
FIXME
(
"%s 0x%08lx %p
\n
"
,
debugstr_a
(
szPackage
),
dwOptions
,
phPackage
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiOpenPackageExW
(
LPCWSTR
szPackage
,
DWORD
dwOptions
,
MSIHANDLE
*
phPackage
)
{
FIXME
(
"%s 0x%08lx %p
\n
"
,
debugstr_w
(
szPackage
),
dwOptions
,
phPackage
);
return
ERROR_CALL_NOT_IMPLEMENTED
;
}
UINT
WINAPI
MsiAdvertiseProductA
(
LPCSTR
szPackagePath
,
LPCSTR
szScriptfilePath
,
LPCSTR
szTransforms
,
LANGID
lgidLanguage
)
{
FIXME
(
"%s %s %s 0x%08x
\n
"
,
debugstr_a
(
szPackagePath
),
debugstr_a
(
szScriptfilePath
),
debugstr_a
(
szTransforms
),
lgidLanguage
);
...
...
@@ -466,7 +440,7 @@ end:
UINT
WINAPI
MsiInstallProductW
(
LPCWSTR
szPackagePath
,
LPCWSTR
szCommandLine
)
{
MSIHANDLE
db
handle
;
MSIHANDLE
package
handle
;
UINT
rc
=
ERROR_SUCCESS
;
FIXME
(
"%s %s
\n
"
,
debugstr_w
(
szPackagePath
),
debugstr_w
(
szCommandLine
));
...
...
@@ -475,13 +449,13 @@ UINT WINAPI MsiInstallProductW(LPCWSTR szPackagePath, LPCWSTR szCommandLine)
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
rc
=
MsiOpen
DatabaseW
(
szPackagePath
,
MSIDBOPEN_READONLY
,
&
db
handle
);
rc
=
MsiOpen
PackageW
(
szPackagePath
,
&
package
handle
);
if
(
rc
!=
ERROR_SUCCESS
)
return
rc
;
ACTION_DoTopLevelINSTALL
(
db
handle
,
szPackagePath
,
szCommandLine
);
ACTION_DoTopLevelINSTALL
(
package
handle
,
szPackagePath
,
szCommandLine
);
MsiCloseHandle
(
db
handle
);
MsiCloseHandle
(
package
handle
);
return
rc
;
}
...
...
@@ -1224,151 +1198,6 @@ BOOL WINAPI MSI_DllCanUnloadNow(void)
return
S_FALSE
;
}
/* property code */
UINT
WINAPI
MsiSetPropertyA
(
MSIHANDLE
hInstall
,
LPCSTR
szName
,
LPCSTR
szValue
)
{
FIXME
(
"STUB until write access is done: (%s %s)
\n
"
,
szName
,
szValue
);
if
(
!
hInstall
)
return
ERROR_INVALID_HANDLE
;
return
ERROR_SUCCESS
;
}
UINT
WINAPI
MsiSetPropertyW
(
MSIHANDLE
hInstall
,
LPCWSTR
szName
,
LPCWSTR
szValue
)
{
FIXME
(
"STUB until write access is done: (%s %s)
\n
"
,
debugstr_w
(
szName
),
debugstr_w
(
szValue
));
if
(
!
hInstall
)
return
ERROR_INVALID_HANDLE
;
return
ERROR_SUCCESS
;
}
UINT
WINAPI
MsiGetPropertyA
(
MSIHANDLE
hInstall
,
LPCSTR
szName
,
LPSTR
szValueBuf
,
DWORD
*
pchValueBuf
)
{
LPWSTR
szwName
=
NULL
,
szwValueBuf
=
NULL
;
UINT
hr
=
ERROR_INSTALL_FAILURE
;
if
(
0
==
hInstall
)
{
return
ERROR_INVALID_HANDLE
;
}
if
(
NULL
==
szName
)
{
return
ERROR_INVALID_PARAMETER
;
}
FIXME
(
"%lu %s %lu
\n
"
,
hInstall
,
debugstr_a
(
szName
),
*
pchValueBuf
);
if
(
NULL
!=
szValueBuf
&&
NULL
==
pchValueBuf
)
{
return
ERROR_INVALID_PARAMETER
;
}
if
(
szName
)
{
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szName
,
-
1
,
NULL
,
0
);
szwName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwName
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szName
,
-
1
,
szwName
,
len
);
}
else
{
return
ERROR_INVALID_PARAMETER
;
}
if
(
szValueBuf
)
{
szwValueBuf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
*
pchValueBuf
)
*
sizeof
(
WCHAR
)
);
if
(
!
szwValueBuf
)
goto
end
;
}
hr
=
MsiGetPropertyW
(
hInstall
,
szwName
,
szwValueBuf
,
pchValueBuf
);
if
(
ERROR_SUCCESS
==
hr
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwValueBuf
,
-
1
,
szValueBuf
,
*
pchValueBuf
,
NULL
,
NULL
);
}
end:
if
(
szwName
)
HeapFree
(
GetProcessHeap
(),
0
,
szwName
);
if
(
szwValueBuf
)
HeapFree
(
GetProcessHeap
(),
0
,
szwValueBuf
);
return
hr
;
}
UINT
WINAPI
MsiGetPropertyW
(
MSIHANDLE
hInstall
,
LPCWSTR
szName
,
LPWSTR
szValueBuf
,
DWORD
*
pchValueBuf
)
{
MSIHANDLE
view
,
row
;
UINT
rc
;
WCHAR
Query
[
1024
]
=
{
's'
,
'e'
,
'l'
,
'e'
,
'c'
,
't'
,
' '
,
'*'
,
' '
,
'f'
,
'r'
,
'o'
,
'm'
,
' '
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
' '
,
'w'
,
'h'
,
'e'
,
'r'
,
'e'
,
' '
,
'`'
,
'P'
,
'r'
,
'o'
,
'p'
,
'e'
,
'r'
,
't'
,
'y'
,
'`'
,
'='
,
'`'
,
0
};
static
const
WCHAR
szEnd
[]
=
{
'`'
,
0
};
if
(
0
==
hInstall
)
{
return
ERROR_INVALID_HANDLE
;
}
if
(
NULL
==
szName
)
{
return
ERROR_INVALID_PARAMETER
;
}
strcatW
(
Query
,
szName
);
strcatW
(
Query
,
szEnd
);
rc
=
MsiDatabaseOpenViewW
(
hInstall
,
Query
,
&
view
);
if
(
rc
==
ERROR_SUCCESS
)
{
DWORD
sz
;
WCHAR
value
[
0x100
];
rc
=
MsiViewExecute
(
view
,
0
);
if
(
rc
!=
ERROR_SUCCESS
)
{
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
return
rc
;
}
rc
=
MsiViewFetch
(
view
,
&
row
);
if
(
rc
==
ERROR_SUCCESS
)
{
sz
=
0x100
;
rc
=
MsiRecordGetStringW
(
row
,
2
,
value
,
&
sz
);
strncpyW
(
szValueBuf
,
value
,
min
(
sz
+
1
,
*
pchValueBuf
));
*
pchValueBuf
=
sz
+
1
;
MsiCloseHandle
(
row
);
}
MsiViewClose
(
view
);
MsiCloseHandle
(
view
);
}
if
(
rc
==
ERROR_SUCCESS
)
TRACE
(
"returning %s for property %s
\n
"
,
debugstr_w
(
szValueBuf
),
debugstr_w
(
szName
));
return
rc
;
}
INT
WINAPI
MsiProcessMessage
(
MSIHANDLE
hInstall
,
INSTALLMESSAGE
eMessageType
,
MSIHANDLE
hRecord
)
{
FIXME
(
"STUB:
\n
"
);
return
ERROR_SUCCESS
;
}
MSIHANDLE
WINAPI
MsiGetActiveDatabase
(
MSIHANDLE
hInstall
)
{
FIXME
(
"Is this correct?
\n
"
);
msihandle_addref
(
hInstall
);
return
hInstall
;
}
UINT
WINAPI
MsiEnumRelatedProductsA
(
LPCSTR
lpUpgradeCode
,
DWORD
dwReserved
,
DWORD
iProductIndex
,
LPSTR
lpProductBuf
)
{
...
...
dlls/msi/msipriv.h
View file @
eb0e0df9
...
...
@@ -145,6 +145,7 @@ typedef struct tagMSIHANDLEINFO
#define MSIHANDLETYPE_SUMMARYINFO 2
#define MSIHANDLETYPE_VIEW 3
#define MSIHANDLETYPE_RECORD 4
#define MSIHANDLETYPE_PACKAGE 5
#define MSI_MAJORVERSION 1
#define MSI_MINORVERSION 10
...
...
dlls/msi/package.c
0 → 100644
View file @
eb0e0df9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment