mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 17:00:51 +08:00
** WIP ** [NETSH] Fix loading providers when testing on Windows
This commit is contained in:
@@ -939,12 +939,18 @@ RegisterContext(
|
||||
pParentContext = pRootContext;
|
||||
if (pHelper != NULL)
|
||||
{
|
||||
pParentContext = FindContextByGuid(&pHelper->ParentHelperGuid);
|
||||
//pParentContext = FindContextByGuid(&pHelper->ParentHelperGuid);
|
||||
if (pHelper->pParentHelper)
|
||||
pParentContext = FindContextByGuid(&pHelper->pParentHelper->Attributes.guidHelper);
|
||||
else
|
||||
pParentContext = NULL;
|
||||
DPRINT("pParentContext %p\n", pParentContext);
|
||||
if (pParentContext == NULL)
|
||||
pParentContext = pRootContext;
|
||||
}
|
||||
|
||||
// TODO: Save pChildContext->dwVersion;
|
||||
|
||||
pContext = AddContext(pParentContext, pChildContext->pwszContext, (GUID*)&pChildContext->guidHelper);
|
||||
if (pContext != NULL)
|
||||
{
|
||||
@@ -999,5 +1005,4 @@ VOID
|
||||
CleanupContext(VOID)
|
||||
{
|
||||
/* Delete the context stack */
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,11 @@ StartHelpers(
|
||||
{
|
||||
if (pHelper->Attributes.pfnStart)
|
||||
{
|
||||
dwError = pHelper->Attributes.pfnStart(NULL, 0);
|
||||
//dwError = pHelper->Attributes.pfnStart(&pHelper->ParentHelperGuid, 0);
|
||||
if (pHelper->pParentHelper)
|
||||
dwError = pHelper->Attributes.pfnStart(&pHelper->pParentHelper->Attributes.guidHelper, pHelper->pParentHelper->Attributes.dwVersion);
|
||||
else
|
||||
dwError = pHelper->Attributes.pfnStart(NULL, 0);
|
||||
if (dwError == ERROR_SUCCESS)
|
||||
pHelper->bStarted = TRUE;
|
||||
}
|
||||
@@ -415,6 +419,7 @@ RegisterHelper(
|
||||
|
||||
if (pguidParentHelper == NULL)
|
||||
{
|
||||
pHelper->pParentHelper = NULL;
|
||||
if ((pHelperListHead == NULL) && (pHelperListTail == NULL))
|
||||
{
|
||||
pHelperListHead = pHelper;
|
||||
@@ -429,13 +434,15 @@ RegisterHelper(
|
||||
}
|
||||
else
|
||||
{
|
||||
CopyMemory(&pHelper->ParentHelperGuid, pguidParentHelper, sizeof(GUID));
|
||||
// TODO: pHelperAttributes->dwVersion
|
||||
//CopyMemory(&pHelper->ParentHelperGuid, pguidParentHelper, sizeof(GUID));
|
||||
pParentHelper = FindHelper(pguidParentHelper, pHelperListHead);
|
||||
if (pParentHelper == NULL)
|
||||
{
|
||||
DPRINT("Parent helper %lx not found!\n", pguidParentHelper->Data1);
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
pHelper->pParentHelper = pParentHelper;
|
||||
|
||||
if ((pParentHelper->pSubHelperHead == NULL) && (pParentHelper->pSubHelperTail == NULL))
|
||||
{
|
||||
|
||||
@@ -58,8 +58,9 @@ typedef struct _HELPER_ENTRY
|
||||
struct _HELPER_ENTRY *pPrev;
|
||||
struct _HELPER_ENTRY *pNext;
|
||||
|
||||
struct _HELPER_ENTRY *pParentHelper;
|
||||
NS_HELPER_ATTRIBUTES Attributes;
|
||||
GUID ParentHelperGuid;
|
||||
// GUID ParentHelperGuid;
|
||||
|
||||
PDLL_LIST_ENTRY pDllEntry;
|
||||
BOOL bStarted;
|
||||
|
||||
Reference in New Issue
Block a user