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
30428c19
Commit
30428c19
authored
May 26, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Remove actctx.c.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6a38ea6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
143 deletions
+101
-143
Makefile.in
dlls/kernel32/Makefile.in
+0
-1
actctx.c
dlls/kernel32/actctx.c
+0
-142
process.c
dlls/kernel32/process.c
+101
-0
No files found.
dlls/kernel32/Makefile.in
View file @
30428c19
...
...
@@ -6,7 +6,6 @@ EXTRALIBS = $(COREFOUNDATION_LIBS) $(POLL_LIBS) $(RT_LIBS)
EXTRADLLFLAGS
=
-nodefaultlibs
-Wb
,-F,KERNEL32.dll
-Wl
,--image-base,0x7b600000
C_SRCS
=
\
actctx.c
\
atom.c
\
comm.c
\
computername.c
\
...
...
dlls/kernel32/actctx.c
deleted
100644 → 0
View file @
b6a38ea6
/*
* Activation contexts
*
* Copyright 2004 Jon Griffiths
* Copyright 2007 Eric Pouech
* Copyright 2007 Jacek Caban for CodeWeavers
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "winternl.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
actctx
);
/***********************************************************************
* CreateActCtxA (KERNEL32.@)
*
* Create an activation context.
*/
HANDLE
WINAPI
DECLSPEC_HOTPATCH
CreateActCtxA
(
PCACTCTXA
pActCtx
)
{
ACTCTXW
actw
;
SIZE_T
len
;
HANDLE
ret
=
INVALID_HANDLE_VALUE
;
LPWSTR
src
=
NULL
,
assdir
=
NULL
,
resname
=
NULL
,
appname
=
NULL
;
TRACE
(
"%p %08x
\n
"
,
pActCtx
,
pActCtx
?
pActCtx
->
dwFlags
:
0
);
if
(
!
pActCtx
||
pActCtx
->
cbSize
!=
sizeof
(
*
pActCtx
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
}
actw
.
cbSize
=
sizeof
(
actw
);
actw
.
dwFlags
=
pActCtx
->
dwFlags
;
if
(
pActCtx
->
lpSource
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpSource
,
-
1
,
NULL
,
0
);
src
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
src
)
return
INVALID_HANDLE_VALUE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpSource
,
-
1
,
src
,
len
);
}
actw
.
lpSource
=
src
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID
)
actw
.
wProcessorArchitecture
=
pActCtx
->
wProcessorArchitecture
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_LANGID_VALID
)
actw
.
wLangId
=
pActCtx
->
wLangId
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpAssemblyDirectory
,
-
1
,
NULL
,
0
);
assdir
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
assdir
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpAssemblyDirectory
,
-
1
,
assdir
,
len
);
actw
.
lpAssemblyDirectory
=
assdir
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_RESOURCE_NAME_VALID
)
{
if
((
ULONG_PTR
)
pActCtx
->
lpResourceName
>>
16
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpResourceName
,
-
1
,
NULL
,
0
);
resname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
resname
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpResourceName
,
-
1
,
resname
,
len
);
actw
.
lpResourceName
=
resname
;
}
else
actw
.
lpResourceName
=
(
LPCWSTR
)
pActCtx
->
lpResourceName
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_APPLICATION_NAME_VALID
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpApplicationName
,
-
1
,
NULL
,
0
);
appname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
appname
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
pActCtx
->
lpApplicationName
,
-
1
,
appname
,
len
);
actw
.
lpApplicationName
=
appname
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_HMODULE_VALID
)
actw
.
hModule
=
pActCtx
->
hModule
;
ret
=
CreateActCtxW
(
&
actw
);
done:
HeapFree
(
GetProcessHeap
(),
0
,
src
);
HeapFree
(
GetProcessHeap
(),
0
,
assdir
);
HeapFree
(
GetProcessHeap
(),
0
,
resname
);
HeapFree
(
GetProcessHeap
(),
0
,
appname
);
return
ret
;
}
/***********************************************************************
* FindActCtxSectionStringA (KERNEL32.@)
*
* Find information about a string in an activation context.
*/
BOOL
WINAPI
FindActCtxSectionStringA
(
DWORD
dwFlags
,
const
GUID
*
lpExtGuid
,
ULONG
ulId
,
LPCSTR
lpSearchStr
,
PACTCTX_SECTION_KEYED_DATA
pInfo
)
{
LPWSTR
search_str
;
DWORD
len
;
BOOL
ret
;
TRACE
(
"%08x %s %u %s %p
\n
"
,
dwFlags
,
debugstr_guid
(
lpExtGuid
),
ulId
,
debugstr_a
(
lpSearchStr
),
pInfo
);
if
(
!
lpSearchStr
||
!
pInfo
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSearchStr
,
-
1
,
NULL
,
0
);
search_str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
lpSearchStr
,
-
1
,
search_str
,
len
);
ret
=
FindActCtxSectionStringW
(
dwFlags
,
lpExtGuid
,
ulId
,
search_str
,
pInfo
);
HeapFree
(
GetProcessHeap
(),
0
,
search_str
);
return
ret
;
}
dlls/kernel32/process.c
View file @
30428c19
...
...
@@ -515,6 +515,107 @@ HANDLE WINAPI KERNEL32_GetCurrentProcess(void)
return
(
HANDLE
)
~
(
ULONG_PTR
)
0
;
}
/***********************************************************************
* CreateActCtxA (KERNEL32.@)
*/
HANDLE
WINAPI
DECLSPEC_HOTPATCH
CreateActCtxA
(
const
ACTCTXA
*
actctx
)
{
ACTCTXW
actw
;
SIZE_T
len
;
HANDLE
ret
=
INVALID_HANDLE_VALUE
;
LPWSTR
src
=
NULL
,
assdir
=
NULL
,
resname
=
NULL
,
appname
=
NULL
;
TRACE
(
"%p %08x
\n
"
,
actctx
,
actctx
?
actctx
->
dwFlags
:
0
);
if
(
!
actctx
||
actctx
->
cbSize
!=
sizeof
(
*
actctx
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
INVALID_HANDLE_VALUE
;
}
actw
.
cbSize
=
sizeof
(
actw
);
actw
.
dwFlags
=
actctx
->
dwFlags
;
if
(
actctx
->
lpSource
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpSource
,
-
1
,
NULL
,
0
);
src
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
src
)
return
INVALID_HANDLE_VALUE
;
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpSource
,
-
1
,
src
,
len
);
}
actw
.
lpSource
=
src
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID
)
actw
.
wProcessorArchitecture
=
actctx
->
wProcessorArchitecture
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_LANGID_VALID
)
actw
.
wLangId
=
actctx
->
wLangId
;
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpAssemblyDirectory
,
-
1
,
NULL
,
0
);
assdir
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
assdir
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpAssemblyDirectory
,
-
1
,
assdir
,
len
);
actw
.
lpAssemblyDirectory
=
assdir
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_RESOURCE_NAME_VALID
)
{
if
((
ULONG_PTR
)
actctx
->
lpResourceName
>>
16
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpResourceName
,
-
1
,
NULL
,
0
);
resname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
resname
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpResourceName
,
-
1
,
resname
,
len
);
actw
.
lpResourceName
=
resname
;
}
else
actw
.
lpResourceName
=
(
LPCWSTR
)
actctx
->
lpResourceName
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_APPLICATION_NAME_VALID
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpApplicationName
,
-
1
,
NULL
,
0
);
appname
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
appname
)
goto
done
;
MultiByteToWideChar
(
CP_ACP
,
0
,
actctx
->
lpApplicationName
,
-
1
,
appname
,
len
);
actw
.
lpApplicationName
=
appname
;
}
if
(
actw
.
dwFlags
&
ACTCTX_FLAG_HMODULE_VALID
)
actw
.
hModule
=
actctx
->
hModule
;
ret
=
CreateActCtxW
(
&
actw
);
done
:
HeapFree
(
GetProcessHeap
(),
0
,
src
);
HeapFree
(
GetProcessHeap
(),
0
,
assdir
);
HeapFree
(
GetProcessHeap
(),
0
,
resname
);
HeapFree
(
GetProcessHeap
(),
0
,
appname
);
return
ret
;
}
/***********************************************************************
* FindActCtxSectionStringA (KERNEL32.@)
*/
BOOL
WINAPI
FindActCtxSectionStringA
(
DWORD
flags
,
const
GUID
*
guid
,
ULONG
id
,
const
char
*
search
,
ACTCTX_SECTION_KEYED_DATA
*
info
)
{
LPWSTR
searchW
;
DWORD
len
;
BOOL
ret
;
TRACE
(
"%08x %s %u %s %p
\n
"
,
flags
,
debugstr_guid
(
guid
),
id
,
debugstr_a
(
search
),
info
);
if
(
!
search
||
!
info
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
search
,
-
1
,
NULL
,
0
);
searchW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
search
,
-
1
,
searchW
,
len
);
ret
=
FindActCtxSectionStringW
(
flags
,
guid
,
id
,
searchW
,
info
);
HeapFree
(
GetProcessHeap
(),
0
,
searchW
);
return
ret
;
}
/***********************************************************************
* CmdBatNotification (KERNEL32.@)
*
...
...
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