mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Update ActiveContext functions in kernel32.dll, implementing them as "smart stubs". Implementation taken from Wine's kernel32 (helps Adobe Photoshop 7.0 according to Wine)
svn path=/trunk/; revision=21949
This commit is contained in:
parent
75b9927111
commit
d7f687486e
3 changed files with 173 additions and 143 deletions
|
@ -3,6 +3,19 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include "../include/debug.h"
|
#include "../include/debug.h"
|
||||||
|
|
||||||
|
#define ACTCTX_FLAGS_ALL (\
|
||||||
|
ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID |\
|
||||||
|
ACTCTX_FLAG_LANGID_VALID |\
|
||||||
|
ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID |\
|
||||||
|
ACTCTX_FLAG_RESOURCE_NAME_VALID |\
|
||||||
|
ACTCTX_FLAG_SET_PROCESS_DEFAULT |\
|
||||||
|
ACTCTX_FLAG_APPLICATION_NAME_VALID |\
|
||||||
|
ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF |\
|
||||||
|
ACTCTX_FLAG_HMODULE_VALID )
|
||||||
|
|
||||||
|
#define ACTCTX_FAKE_HANDLE ((HANDLE) 0xf00baa)
|
||||||
|
#define ACTCTX_FAKE_COOKIE ((ULONG_PTR) 0xf00bad)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -94,3 +107,162 @@ CreateActCtxA(
|
||||||
|
|
||||||
return hRetVal;
|
return hRetVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
ActivateActCtx(
|
||||||
|
HANDLE hActCtx,
|
||||||
|
ULONG_PTR *ulCookie
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("ActivateActCtx(%p %p)\n", hActCtx, ulCookie );
|
||||||
|
if (ulCookie)
|
||||||
|
*ulCookie = ACTCTX_FAKE_COOKIE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
STDCALL
|
||||||
|
AddRefActCtx(
|
||||||
|
HANDLE hActCtx
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("AddRefActCtx(%p)\n", hActCtx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
HANDLE
|
||||||
|
STDCALL
|
||||||
|
CreateActCtxW(
|
||||||
|
PCACTCTXW pActCtx
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("CreateActCtxW(%p %08lx)\n", pActCtx, pActCtx ? pActCtx->dwFlags : 0);
|
||||||
|
|
||||||
|
if (!pActCtx)
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
if (pActCtx->cbSize != sizeof *pActCtx)
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
if (pActCtx->dwFlags & ~ACTCTX_FLAGS_ALL)
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
return ACTCTX_FAKE_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
DeactivateActCtx(
|
||||||
|
DWORD dwFlags,
|
||||||
|
ULONG_PTR ulCookie
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("DeactivateActCtx(%08lx %08lx)\n", dwFlags, ulCookie);
|
||||||
|
if (ulCookie != ACTCTX_FAKE_COOKIE)
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
FindActCtxSectionGuid(
|
||||||
|
DWORD dwFlags,
|
||||||
|
const GUID *lpExtensionGuid,
|
||||||
|
ULONG ulSectionId,
|
||||||
|
const GUID *lpGuidToFind,
|
||||||
|
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
FindActCtxSectionStringW(
|
||||||
|
DWORD dwFlags,
|
||||||
|
const GUID *lpExtensionGuid,
|
||||||
|
ULONG ulSectionId,
|
||||||
|
LPCWSTR lpStringToFind,
|
||||||
|
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
GetCurrentActCtx(
|
||||||
|
HANDLE *phActCtx)
|
||||||
|
{
|
||||||
|
DPRINT("GetCurrentActCtx(%p)\n", phActCtx);
|
||||||
|
*phActCtx = ACTCTX_FAKE_HANDLE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
QueryActCtxW(
|
||||||
|
DWORD dwFlags,
|
||||||
|
HANDLE hActCtx,
|
||||||
|
PVOID pvSubInstance,
|
||||||
|
ULONG ulInfoClass,
|
||||||
|
PVOID pvBuffer,
|
||||||
|
SIZE_T cbBuffer OPTIONAL,
|
||||||
|
SIZE_T *pcbWrittenOrRequired OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
|
||||||
|
/* this makes Adobe Photoshop 7.0 happy */
|
||||||
|
SetLastError( ERROR_CALL_NOT_IMPLEMENTED);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
STDCALL
|
||||||
|
ReleaseActCtx(
|
||||||
|
HANDLE hActCtx
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("ReleaseActCtx(%p)\n", hActCtx);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
ZombifyActCtx(
|
||||||
|
HANDLE hActCtx
|
||||||
|
)
|
||||||
|
{
|
||||||
|
DPRINT("ZombifyActCtx(%p)\n", hActCtx);
|
||||||
|
if (hActCtx != ACTCTX_FAKE_HANDLE)
|
||||||
|
return FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
|
@ -357,32 +357,6 @@ VirtualBufferExceptionHandler (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
ActivateActCtx(
|
|
||||||
HANDLE hActCtx,
|
|
||||||
ULONG_PTR *lpCookie
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
STDCALL
|
|
||||||
AddRefActCtx(
|
|
||||||
HANDLE hActCtx
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -426,19 +400,6 @@ CancelDeviceWakeupRequest(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
HANDLE
|
|
||||||
STDCALL
|
|
||||||
CreateActCtxW(
|
|
||||||
PCACTCTXW pActCtx
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return INVALID_HANDLE_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -453,37 +414,6 @@ CreateJobSet (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
DeactivateActCtx(
|
|
||||||
DWORD dwFlags,
|
|
||||||
ULONG_PTR ulCookie
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
FindActCtxSectionGuid(
|
|
||||||
DWORD dwFlags,
|
|
||||||
const GUID *lpExtensionGuid,
|
|
||||||
ULONG ulSectionId,
|
|
||||||
const GUID *lpGuidToFind,
|
|
||||||
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -525,18 +455,6 @@ FreeUserPhysicalPages(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
GetCurrentActCtx(
|
|
||||||
HANDLE *lphActCtx)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -702,25 +620,6 @@ MapUserPhysicalPagesScatter(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
QueryActCtxW(
|
|
||||||
DWORD dwFlags,
|
|
||||||
HANDLE hActCtx,
|
|
||||||
PVOID pvSubInstance,
|
|
||||||
ULONG ulInfoClass,
|
|
||||||
PVOID pvBuffer,
|
|
||||||
SIZE_T cbBuffer OPTIONAL,
|
|
||||||
SIZE_T *pcbWrittenOrRequired OPTIONAL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -791,18 +690,6 @@ RegisterWaitForSingleObjectEx(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
VOID
|
|
||||||
STDCALL
|
|
||||||
ReleaseActCtx(
|
|
||||||
HANDLE hActCtx
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -954,19 +841,6 @@ WriteFileGather(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
ZombifyActCtx(
|
|
||||||
HANDLE hActCtx
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -995,23 +869,6 @@ DnsHostnameToComputerNameW (
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
BOOL
|
|
||||||
STDCALL
|
|
||||||
FindActCtxSectionStringW(
|
|
||||||
DWORD dwFlags,
|
|
||||||
const GUID *lpExtensionGuid,
|
|
||||||
ULONG ulSectionId,
|
|
||||||
LPCWSTR lpStringToFind,
|
|
||||||
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
|
||||||
)
|
|
||||||
{
|
|
||||||
STUB;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -495,6 +495,7 @@ extern "C" {
|
||||||
#define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
|
#define ACTCTX_FLAG_RESOURCE_NAME_VALID 0x00000008
|
||||||
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
|
#define ACTCTX_FLAG_SET_PROCESS_DEFAULT 0x00000010
|
||||||
#define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
|
#define ACTCTX_FLAG_APPLICATION_NAME_VALID 0x00000020
|
||||||
|
#define ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF 0x00000040
|
||||||
#define ACTCTX_FLAG_HMODULE_VALID 0x00000080
|
#define ACTCTX_FLAG_HMODULE_VALID 0x00000080
|
||||||
#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
|
#define DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION 0x00000001
|
||||||
#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
|
#define FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX 0x00000001
|
||||||
|
|
Loading…
Reference in a new issue