mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 11:21:59 +00:00
implemented CreateActCtxA, FindActCtxSectionStringA
svn path=/trunk/; revision=19424
This commit is contained in:
parent
a09fa8cc1c
commit
c902c40ab5
3 changed files with 99 additions and 33 deletions
|
@ -52,6 +52,7 @@
|
|||
<file>virtual.c</file>
|
||||
</directory>
|
||||
<directory name="misc">
|
||||
<file>actctx.c</file>
|
||||
<file>atom.c</file>
|
||||
<file>chartype.c</file>
|
||||
<file>comm.c</file>
|
||||
|
|
96
reactos/lib/kernel32/misc/ActCtx.c
Normal file
96
reactos/lib/kernel32/misc/ActCtx.c
Normal file
|
@ -0,0 +1,96 @@
|
|||
#include <k32.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include "../include/debug.h"
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
FindActCtxSectionStringA(
|
||||
DWORD dwFlags,
|
||||
const GUID *lpExtensionGuid,
|
||||
ULONG ulSectionId,
|
||||
LPCSTR lpStringToFind,
|
||||
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
||||
)
|
||||
{
|
||||
BOOL bRetVal;
|
||||
LPWSTR lpStringToFindW;
|
||||
|
||||
/* Convert lpStringToFind */
|
||||
if (lpStringToFind)
|
||||
{
|
||||
BasepAnsiStringToHeapUnicodeString(lpStringToFind,
|
||||
(LPWSTR*) &lpStringToFindW);
|
||||
}
|
||||
|
||||
/* Call the Unicode function */
|
||||
bRetVal = FindActCtxSectionStringA(dwFlags,
|
||||
lpExtensionGuid,
|
||||
ulSectionId,
|
||||
lpStringToFind,
|
||||
ReturnedData);
|
||||
|
||||
/* Clean up */
|
||||
RtlFreeHeap(GetProcessHeap(), 0, (LPWSTR*) lpStringToFindW);
|
||||
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HANDLE
|
||||
STDCALL
|
||||
CreateActCtxA(
|
||||
PCACTCTXA pActCtx
|
||||
)
|
||||
{
|
||||
ACTCTXW pActCtxW;
|
||||
HANDLE hRetVal;
|
||||
|
||||
ZeroMemory(&pActCtxW, sizeof(pActCtxW));
|
||||
pActCtxW.cbSize = sizeof(pActCtxW);
|
||||
pActCtxW.dwFlags = pActCtx->dwFlags;
|
||||
pActCtxW.wProcessorArchitecture = pActCtx->wProcessorArchitecture;
|
||||
pActCtxW.dwFlags = pActCtx->wProcessorArchitecture;
|
||||
|
||||
pActCtxW.hModule = pActCtx->hModule;
|
||||
|
||||
/* Convert ActCtx Strings */
|
||||
if (pActCtx->lpAssemblyDirectory)
|
||||
{
|
||||
BasepAnsiStringToHeapUnicodeString(pActCtx->lpSource,
|
||||
(LPWSTR*) &pActCtxW.lpSource);
|
||||
}
|
||||
|
||||
if (pActCtx->lpAssemblyDirectory)
|
||||
{
|
||||
BasepAnsiStringToHeapUnicodeString(pActCtx->lpAssemblyDirectory,
|
||||
(LPWSTR*) &pActCtxW.lpAssemblyDirectory);
|
||||
}
|
||||
if (pActCtx->lpResourceName)
|
||||
{
|
||||
BasepAnsiStringToHeapUnicodeString(pActCtx->lpResourceName,
|
||||
(LPWSTR*) &pActCtxW.lpResourceName);
|
||||
}
|
||||
if (pActCtx->lpApplicationName)
|
||||
{
|
||||
BasepAnsiStringToHeapUnicodeString(pActCtx->lpApplicationName,
|
||||
(LPWSTR*) &pActCtxW.lpApplicationName);
|
||||
}
|
||||
|
||||
/* Call the Unicode function */
|
||||
hRetVal = CreateActCtxW(&pActCtxW);
|
||||
|
||||
/* Clean up */
|
||||
RtlFreeHeap(GetProcessHeap(), 0, (LPWSTR*) pActCtxW.lpSource);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, (LPWSTR*) pActCtxW.lpAssemblyDirectory);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, (LPWSTR*) pActCtxW.lpResourceName);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, (LPWSTR*) pActCtxW.lpApplicationName);
|
||||
|
||||
return hRetVal;
|
||||
}
|
|
@ -453,20 +453,6 @@ CancelDeviceWakeupRequest(
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
HANDLE
|
||||
STDCALL
|
||||
CreateActCtxA(
|
||||
PCACTCTXA pActCtx
|
||||
)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
@ -477,7 +463,7 @@ CreateActCtxW(
|
|||
)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1050,7 +1036,7 @@ FindActCtxSectionStringW(
|
|||
)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1267,23 +1253,6 @@ DnsHostnameToComputerNameA (
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
FindActCtxSectionStringA(
|
||||
DWORD dwFlags,
|
||||
const GUID *lpExtensionGuid,
|
||||
ULONG ulSectionId,
|
||||
LPCSTR lpStringToFind,
|
||||
PACTCTX_SECTION_KEYED_DATA ReturnedData
|
||||
)
|
||||
{
|
||||
STUB;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue