Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3a71513d
Commit
3a71513d
authored
Jul 25, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Initial implementation of RtlQueryInformationActivationContext.
Partially based on a patch by Eric Pouech.
parent
5b844fe8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
6 deletions
+86
-6
actctx.c
dlls/kernel32/actctx.c
+9
-5
actctx.c
dlls/ntdll/actctx.c
+74
-0
ntdll.spec
dlls/ntdll/ntdll.spec
+1
-1
winternl.h
include/winternl.h
+2
-0
No files found.
dlls/kernel32/actctx.c
View file @
3a71513d
...
...
@@ -293,9 +293,13 @@ BOOL WINAPI QueryActCtxW(DWORD dwFlags, HANDLE hActCtx, PVOID pvSubInst,
ULONG
ulClass
,
PVOID
pvBuff
,
SIZE_T
cbBuff
,
SIZE_T
*
pcbLen
)
{
FIXME
(
"%08x %p %p %u %p %ld %p
\n
"
,
dwFlags
,
hActCtx
,
pvSubInst
,
ulClass
,
pvBuff
,
cbBuff
,
pcbLen
);
/* this makes Adobe Photoshop 7.0 happy */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
NTSTATUS
status
;
if
((
status
=
RtlQueryInformationActivationContext
(
dwFlags
,
hActCtx
,
pvSubInst
,
ulClass
,
pvBuff
,
cbBuff
,
pcbLen
)))
{
SetLastError
(
RtlNtStatusToDosError
(
status
));
return
FALSE
;
}
return
TRUE
;
}
dlls/ntdll/actctx.c
View file @
3a71513d
...
...
@@ -1893,6 +1893,37 @@ static NTSTATUS parse_depend_manifests(struct actctx_loader* acl)
return
status
;
}
/* find the appropriate activation context for RtlQueryInformationActivationContext */
static
NTSTATUS
find_query_actctx
(
HANDLE
*
handle
,
DWORD
flags
)
{
NTSTATUS
status
=
STATUS_SUCCESS
;
if
(
flags
&
QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
)
{
if
(
NtCurrentTeb
()
->
ActivationContextStack
.
ActiveFrame
)
*
handle
=
NtCurrentTeb
()
->
ActivationContextStack
.
ActiveFrame
->
ActivationContext
;
}
else
if
(
flags
&
(
QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS
|
QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE
))
{
ULONG
magic
;
LDR_MODULE
*
pldr
;
LdrLockLoaderLock
(
0
,
NULL
,
&
magic
);
if
(
!
LdrFindEntryForAddress
(
*
handle
,
&
pldr
))
{
if
((
flags
&
QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE
)
&&
*
handle
!=
pldr
->
BaseAddress
)
status
=
STATUS_DLL_NOT_FOUND
;
else
*
handle
=
pldr
->
ActivationContext
;
}
else
status
=
STATUS_DLL_NOT_FOUND
;
LdrUnlockLoaderLock
(
0
,
magic
);
}
else
if
(
!*
handle
)
*
handle
=
process_actctx
;
return
status
;
}
/* initialize the activation context for the current process */
void
actctx_init
(
void
)
{
...
...
@@ -2149,3 +2180,46 @@ BOOLEAN WINAPI RtlIsActivationContextActive( HANDLE handle )
if
(
frame
->
ActivationContext
==
handle
)
return
TRUE
;
return
FALSE
;
}
/***********************************************************************
* RtlQueryInformationActivationContext (NTDLL.@)
*
* Get information about an activation context.
* FIXME: function signature/prototype may be wrong
*/
NTSTATUS
WINAPI
RtlQueryInformationActivationContext
(
ULONG
flags
,
HANDLE
handle
,
PVOID
subinst
,
ULONG
class
,
PVOID
buffer
,
SIZE_T
bufsize
,
SIZE_T
*
retlen
)
{
NTSTATUS
status
;
TRACE
(
"%08x %p %p %u %p %ld %p
\n
"
,
flags
,
handle
,
subinst
,
class
,
buffer
,
bufsize
,
retlen
);
if
((
status
=
find_query_actctx
(
&
handle
,
flags
)))
return
status
;
switch
(
class
)
{
case
ActivationContextBasicInformation
:
{
ACTIVATION_CONTEXT_BASIC_INFORMATION
*
info
=
buffer
;
if
(
retlen
)
*
retlen
=
sizeof
(
*
info
);
if
(
!
info
||
bufsize
<
sizeof
(
*
info
))
return
STATUS_BUFFER_TOO_SMALL
;
info
->
hActCtx
=
handle
;
info
->
dwFlags
=
0
;
/* FIXME */
if
(
!
(
flags
&
QUERY_ACTCTX_FLAG_NO_ADDREF
))
RtlAddRefActivationContext
(
handle
);
}
break
;
case
ActivationContextDetailedInformation
:
case
AssemblyDetailedInformationInActivationContext
:
case
FileInformationInAssemblyOfAssemblyInActivationContext
:
default:
FIXME
(
"class %u not implemented
\n
"
,
class
);
return
STATUS_NOT_IMPLEMENTED
;
}
return
STATUS_SUCCESS
;
}
dlls/ntdll/ntdll.spec
View file @
3a71513d
...
...
@@ -767,7 +767,7 @@
@ stdcall RtlQueryEnvironmentVariable_U(ptr ptr ptr)
@ stub RtlQueryHeapInformation
@ stdcall RtlQueryInformationAcl(ptr ptr long long)
@ st
ub RtlQueryInformationActivationContext
@ st
dcall RtlQueryInformationActivationContext(long long ptr ptr long ptr long ptr)
@ stub RtlQueryInformationActiveActivationContext
@ stub RtlQueryInterfaceMemoryStream
@ stub RtlQueryProcessBackTraceInformation
...
...
include/winternl.h
View file @
3a71513d
...
...
@@ -2195,10 +2195,12 @@ BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRI
NTSTATUS
WINAPI
RtlQueryAtomInAtomTable
(
RTL_ATOM_TABLE
,
RTL_ATOM
,
ULONG
*
,
ULONG
*
,
WCHAR
*
,
ULONG
*
);
NTSTATUS
WINAPI
RtlQueryEnvironmentVariable_U
(
PWSTR
,
PUNICODE_STRING
,
PUNICODE_STRING
);
NTSTATUS
WINAPI
RtlQueryInformationAcl
(
PACL
,
LPVOID
,
DWORD
,
ACL_INFORMATION_CLASS
);
NTSTATUS
WINAPI
RtlQueryInformationActivationContext
(
ULONG
,
HANDLE
,
PVOID
,
ULONG
,
PVOID
,
SIZE_T
,
SIZE_T
*
);
NTSTATUS
WINAPI
RtlQueryProcessDebugInformation
(
ULONG
,
ULONG
,
PDEBUG_BUFFER
);
NTSTATUS
WINAPI
RtlQueryRegistryValues
(
ULONG
,
PCWSTR
,
PRTL_QUERY_REGISTRY_TABLE
,
PVOID
,
PVOID
);
NTSTATUS
WINAPI
RtlQueryTimeZoneInformation
(
RTL_TIME_ZONE_INFORMATION
*
);
NTSTATUS
WINAPI
RtlQueueWorkItem
(
PRTL_WORK_ITEM_ROUTINE
,
PVOID
,
ULONG
);
void
WINAPI
RtlRaiseException
(
PEXCEPTION_RECORD
);
void
WINAPI
RtlRaiseStatus
(
NTSTATUS
);
ULONG
WINAPI
RtlRandom
(
PULONG
);
...
...
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