35 while (pHelper !=
NULL)
48 while (pSubHelper !=
NULL)
51 pSubHelper = pSubHelper->
pNext;
54 pHelper = pHelper->
pNext;
122 PWSTR pszStart, pszEnd;
144 if (pszStart ==
NULL)
194 DPRINT1(
"Could not load the helper dll %S (Error: %lu)\n",
pEntry->pszDllName, dwError);
199 if (pInitHelperDll ==
NULL)
202 DPRINT1(
"Could not find 'InitHelperDll' (Error: %lu)\n", dwError);
207 dwError = pInitHelperDll(5,
NULL);
210 DPRINT1(
"InitHelperDll returned %lu\n", dwError);
213 DPRINT1(
"Call to InitHelperDll failed (Error: %lu)\n", dwError);
268 DWORD dwValueCount, dwMaxNameLength, dwMaxValueLength;
269 DWORD dwNameLength, dwValueLength, dwType;
270 DWORD dwIndex, dwError;
298 (dwMaxNameLength + 1) *
sizeof(
WCHAR));
299 if (pszNameBuffer ==
NULL)
303 dwMaxValueLength +
sizeof(
WCHAR));
304 if (pszValueBuffer ==
NULL)
307 for (dwIndex = 0; dwIndex < dwValueCount; dwIndex++)
309 dwNameLength = dwMaxNameLength + 1;
310 dwValueLength = dwMaxValueLength +
sizeof(
WCHAR);
317 (
PBYTE)pszValueBuffer,
322 DPRINT1(
"Dll: %S --> %S %lu\n", pszNameBuffer, pszValueBuffer, dwError);
367 while (pHelper !=
NULL)
369 if (
IsEqualGUID(pguidHelper, &pHelper->Attributes.guidHelper))
372 pFoundHelper =
FindHelper(pguidHelper, pHelper->pSubHelperHead);
376 pHelper = pHelper->
pNext;
392 DPRINT(
"RegisterHelper(%p %p)\n", pguidParentHelper, pHelperAttributes);
396 DPRINT1(
"The Helper has already been registered!\n");
407 DPRINT(
"Guid: %lx\n", pHelperAttributes->guidHelper.Data1);
408 DPRINT(
"dwVersion: %lu\n", pHelperAttributes->dwVersion);
409 DPRINT(
"pfnStart: %p\n", pHelperAttributes->pfnStart);
410 DPRINT(
"pfnStop: %p\n", pHelperAttributes->pfnStop);
416 if (pguidParentHelper ==
NULL)
434 if (pParentHelper ==
NULL)
436 DPRINT(
"Parent helper %lx not found!\n", pguidParentHelper->Data1);
440 if ((pParentHelper->pSubHelperHead ==
NULL) && (pParentHelper->pSubHelperTail ==
NULL))
442 pParentHelper->pSubHelperHead = pHelper;
447 pHelper->
pPrev = pParentHelper->pSubHelperTail;
448 pParentHelper->pSubHelperTail->pNext = pHelper;
472 DPRINT(
"AddHelperCommand()\n");
506 DPRINT(
"DeleteHelper()\n");
568 for (
i = 0;
i <
min(dwLevel, 10) * 2;
i++)
573 while (pHelper !=
NULL)
581 DPRINT(
"pContext: %p\n", pContext);
585 L"{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X} %-16s %s%s\n",
607 pHelper = pHelper->
pNext;
623 DPRINT(
"ShowHelperCommand()\n");
626 ConPrintf(
StdOut,
L"-------------------------------------- ---------------- --------\n");
void ConPrintf(FILE *fp, LPCWSTR psz,...)
PCONTEXT_ENTRY FindContextByGuid(const GUID *pGuid)
PCONTEXT_ENTRY pRootContext
struct _HELPER_ENTRY * PHELPER_ENTRY
struct _HELPER_ENTRY HELPER_ENTRY
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
PDLL_LIST_ENTRY pDllListHead
DWORD CreateRootHelper(VOID)
PHELPER_ENTRY FindHelper(_In_ const GUID *pguidHelper, _In_ PHELPER_ENTRY pHelper)
DWORD WINAPI ShowHelperCommand(LPCWSTR pwszMachine, LPWSTR *ppwcArguments, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
static VOID PrintHelpers(_In_ PHELPER_ENTRY pHelperListHead, _In_ DWORD dwLevel)
DWORD WINAPI RegisterHelper(_In_ const GUID *pguidParentHelper, _In_ const NS_HELPER_ATTRIBUTES *pHelperAttributes)
static VOID StartHelpers(PHELPER_ENTRY pHelper)
DWORD WINAPI AddHelperCommand(LPCWSTR pwszMachine, LPWSTR *ppwcArguments, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
DWORD WINAPI DeleteHelperCommand(LPCWSTR pwszMachine, LPWSTR *ppwcArguments, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
static VOID FreeHelperDll(_In_ PDLL_LIST_ENTRY pEntry)
PDLL_LIST_ENTRY pCurrentDll
PDLL_LIST_ENTRY pDllListTail
static VOID RegisterHelperDll(_In_ PDLL_LIST_ENTRY pEntry)
PHELPER_ENTRY pHelperListHead
static DWORD LoadHelperDll(_In_ PWSTR pszDllName, _In_ BOOL bRegister)
PHELPER_ENTRY pHelperListTail
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
NS_DLL_INIT_FN * PNS_DLL_INIT_FN
_In_ LPWSTR _In_ DWORD _In_ LPCVOID pvData
_In_ LPWSTR * ppwcArguments
_In_ LPWSTR _In_ DWORD dwArgCount
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD _In_ LPCVOID _Out_ BOOL * pbDone
_In_ LPWSTR _In_ DWORD dwCurrentIndex
#define REG_OPTION_NON_VOLATILE
#define IsEqualGUID(rguid1, rguid2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
struct _DLL_LIST_ENTRY * pPrev
struct _HELPER_ENTRY * pSubHelperTail
NS_HELPER_ATTRIBUTES Attributes
struct _HELPER_ENTRY * pSubHelperHead
PDLL_LIST_ENTRY pDllEntry
struct _HELPER_ENTRY * pNext
struct _HELPER_ENTRY * pPrev
PNS_HELPER_START_FN pfnStart
DWORD WINAPI GetLastError(void)
#define HKEY_LOCAL_MACHINE