Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
f92deed2
Commit
f92deed2
authored
21 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
21 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove references to HEAP_strdupAtoW.
parent
4d6a47a2
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dlls/msi/msi.c
+30
-15
30 additions, 15 deletions
dlls/msi/msi.c
dlls/msi/msipriv.h
+0
-14
0 additions, 14 deletions
dlls/msi/msipriv.h
dlls/msi/msiquery.c
+4
-2
4 additions, 2 deletions
dlls/msi/msiquery.c
dlls/msi/suminfo.c
+4
-1
4 additions, 1 deletion
dlls/msi/suminfo.c
with
38 additions
and
32 deletions
dlls/msi/msi.c
+
30
−
15
View file @
f92deed2
/*
* Implementation of the Microsoft Installer (msi.dll)
*
* Copyright 2002 Mike McCormack for CodeWeavers
* Copyright 2002
,2003
Mike McCormack for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -25,6 +25,7 @@
#include
"windef.h"
#include
"winbase.h"
#include
"winreg.h"
#include
"winnls.h"
#include
"shlwapi.h"
#include
"wine/debug.h"
#include
"msi.h"
...
...
@@ -135,21 +136,26 @@ UINT WINAPI MsiOpenDatabaseA(
{
HRESULT
r
=
ERROR_FUNCTION_FAILED
;
LPWSTR
szwDBPath
=
NULL
,
szwPersist
=
NULL
;
UINT
len
;
TRACE
(
"%s %s %p
\n
"
,
debugstr_a
(
szDBPath
),
debugstr_a
(
szPersist
),
phDB
);
if
(
szDBPath
)
{
szwDBPath
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szDBPath
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szDBPath
,
-
1
,
NULL
,
0
);
szwDBPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwDBPath
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szDBPath
,
-
1
,
szwDBPath
,
len
);
}
if
(
szPersist
)
{
szwPersist
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szPersist
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szPersist
,
-
1
,
NULL
,
0
);
szwPersist
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwPersist
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szPersist
,
-
1
,
szwPersist
,
len
);
}
r
=
MsiOpenDatabaseW
(
szwDBPath
,
szwPersist
,
phDB
);
...
...
@@ -287,16 +293,20 @@ UINT WINAPI MsiInstallProductA(LPCSTR szPackagePath, LPCSTR szCommandLine)
if
(
szPackagePath
)
{
szwPath
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szPackagePath
);
if
(
szwPath
==
NULL
)
goto
end
;
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szPackagePath
,
-
1
,
NULL
,
0
);
szwPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwPath
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szPackagePath
,
-
1
,
szwPath
,
len
);
}
if
(
szCommandLine
)
{
szwCommand
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szCommandLine
);
if
(
szwCommand
==
NULL
)
goto
end
;
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
NULL
,
0
);
szwCommand
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwCommand
)
goto
end
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szCommandLine
,
-
1
,
szwCommand
,
len
);
}
r
=
MsiInstallProductW
(
szwPath
,
szwCommand
);
...
...
@@ -478,13 +488,15 @@ UINT WINAPI MsiEnumFeaturesA(LPCSTR szProduct, DWORD index,
if
(
szProduct
)
{
szwProduct
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szProduct
);
if
(
!
szwProduct
)
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
NULL
,
0
);
szwProduct
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwProduct
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szProduct
,
-
1
,
szwProduct
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
r
=
MsiEnumFeaturesW
(
szProduct
?
szwProduct
:
NULL
,
index
,
szwFeature
,
szwParent
);
r
=
MsiEnumFeaturesW
(
szwProduct
,
index
,
szwFeature
,
szwParent
);
if
(
r
==
ERROR_SUCCESS
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
szwFeature
,
-
1
,
...
...
@@ -591,8 +603,11 @@ UINT WINAPI MsiEnumClientsA(LPCSTR szComponent, DWORD index, LPSTR szProduct)
if
(
szComponent
)
{
szwComponent
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szComponent
);
if
(
!
szwComponent
)
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
NULL
,
0
);
szwComponent
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
szwComponent
)
MultiByteToWideChar
(
CP_ACP
,
0
,
szComponent
,
-
1
,
szwComponent
,
len
);
else
return
ERROR_FUNCTION_FAILED
;
}
...
...
This diff is collapsed.
Click to expand it.
dlls/msi/msipriv.h
+
0
−
14
View file @
f92deed2
...
...
@@ -173,18 +173,4 @@ extern LPWSTR MSI_makestring( MSIDATABASE *db, UINT stringid);
UINT
VIEW_find_column
(
MSIVIEW
*
view
,
LPWSTR
name
,
UINT
*
n
);
/* FIXME! should get rid of that */
#include
"winnls.h"
inline
static
LPWSTR
HEAP_strdupAtoW
(
HANDLE
heap
,
DWORD
flags
,
LPCSTR
str
)
{
LPWSTR
ret
;
INT
len
;
if
(
!
str
)
return
NULL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
ret
=
HeapAlloc
(
heap
,
flags
,
len
*
sizeof
(
WCHAR
)
);
if
(
ret
)
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
return
ret
;
}
#endif
/* __WINE_MSI_PRIVATE__ */
This diff is collapsed.
Click to expand it.
dlls/msi/msiquery.c
+
4
−
2
View file @
f92deed2
...
...
@@ -97,15 +97,17 @@ UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE hdb,
LPCSTR
szQuery
,
MSIHANDLE
*
phView
)
{
UINT
r
;
LP
C
WSTR
szwQuery
;
LPWSTR
szwQuery
;
TRACE
(
"%ld %s %p
\n
"
,
hdb
,
debugstr_a
(
szQuery
),
phView
);
if
(
szQuery
)
{
szwQuery
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szQuery
);
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szQuery
,
-
1
,
NULL
,
0
);
szwQuery
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwQuery
)
return
ERROR_FUNCTION_FAILED
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szQuery
,
-
1
,
szwQuery
,
len
);
}
else
szwQuery
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
dlls/msi/suminfo.c
+
4
−
1
View file @
f92deed2
...
...
@@ -25,6 +25,7 @@
#include
"windef.h"
#include
"winbase.h"
#include
"winreg.h"
#include
"winnls.h"
#include
"shlwapi.h"
#include
"wine/debug.h"
#include
"msi.h"
...
...
@@ -54,9 +55,11 @@ UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase,
if
(
szDatabase
)
{
szwDatabase
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
szDatabase
);
UINT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szDatabase
,
-
1
,
NULL
,
0
);
szwDatabase
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
if
(
!
szwDatabase
)
return
ERROR_FUNCTION_FAILED
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szDatabase
,
-
1
,
szwDatabase
,
len
);
}
ret
=
MsiGetSummaryInformationW
(
hDatabase
,
szwDatabase
,
uiUpdateCount
,
phSummaryInfo
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment