** WIP ** [NETSH] Fix loading providers when testing on Windows

This commit is contained in:
Hermès Bélusca-Maïto
2026-03-30 22:56:16 +02:00
parent 6d698c15f8
commit f76cfad87b
3 changed files with 18 additions and 5 deletions

View File

@@ -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 */
}

View File

@@ -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))
{

View File

@@ -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;