35 while (pHelper !=
NULL)
47 pHelper = pHelper->
pNext;
115 PWSTR pszStart, pszEnd;
137 if (pszStart ==
NULL)
187 DPRINT1(
"Could not load the helper dll %S (Error: %lu)\n",
pEntry->pszDllName, dwError);
192 if (pInitHelperDll ==
NULL)
195 DPRINT1(
"Could not find 'InitHelperDll' (Error: %lu)\n", dwError);
200 dwError = pInitHelperDll(5,
NULL);
203 DPRINT1(
"InitHelperDll returned %lu\n", dwError);
206 DPRINT1(
"Call to InitHelperDll failed (Error: %lu)\n", dwError);
246 DWORD dwValueCount, dwMaxNameLength, dwMaxValueLength;
247 DWORD dwNameLength, dwValueLength, dwType;
248 DWORD dwIndex, dwError;
276 (dwMaxNameLength + 1) *
sizeof(
WCHAR));
277 if (pszNameBuffer ==
NULL)
281 dwMaxValueLength +
sizeof(
WCHAR));
282 if (pszValueBuffer ==
NULL)
285 for (dwIndex = 0; dwIndex < dwValueCount; dwIndex++)
287 dwNameLength = dwMaxNameLength + 1;
288 dwValueLength = dwMaxValueLength +
sizeof(
WCHAR);
295 (
PBYTE)pszValueBuffer,
300 DPRINT1(
"Dll: %S --> %S %lu\n", pszNameBuffer, pszValueBuffer, dwError);
344 while (pHelper !=
NULL)
349 pHelper = pHelper->
pNext;
365 DPRINT(
"RegisterHelper(%p %p)\n", pguidParentHelper, pHelperAttributes);
369 DPRINT1(
"The Helper has already been registered!\n");
384 if (pguidParentHelper ==
NULL)
400 pParentHelper =
FindHelper(&pHelperAttributes->guidHelper);
401 if (pParentHelper ==
NULL)
404 if (pParentHelper->pSubHelperHead ==
NULL && pParentHelper->pSubHelperTail ==
NULL)
406 pParentHelper->pSubHelperHead = pHelper;
411 pHelper->
pPrev = pParentHelper->pSubHelperTail;
412 pParentHelper->pSubHelperTail->pNext = pHelper;
428 DWORD dwCurrentIndex,
436 DPRINT(
"AddHelperCommand()\n");
460 DWORD dwCurrentIndex,
470 DPRINT(
"DeleteHelper()\n");
482 if (
wcscmp(
pEntry->pszShortName, ppwcArguments[2]) == 0)
531 if (pParentContext ==
NULL)
535 while (pContext !=
NULL)
543 for (
i = 0;
i < dwLevel * 2;
i++)
547 ConPrintf(
StdOut,
L"{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X} %-16s %s%s\n",
566 pContext = pContext->
pNext;
576 DWORD dwCurrentIndex,
582 DPRINT(
"ShowHelperCommand()\n");
585 ConPrintf(
StdOut,
L"-------------------------------------- ---------------- --------\n");
void ConPrintf(FILE *fp, LPCWSTR psz,...)
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
PHELPER_ENTRY FindHelper(_In_ const GUID *pguidHelper)
static VOID StartHelpers(VOID)
DWORD WINAPI ShowHelperCommand(LPCWSTR pwszMachine, LPWSTR *ppwcArguments, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
DWORD WINAPI RegisterHelper(_In_ const GUID *pguidParentHelper, _In_ const NS_HELPER_ATTRIBUTES *pHelperAttributes)
static VOID PrintSubContext(_In_ PCONTEXT_ENTRY pParentContext, _In_ DWORD dwLevel)
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)
DWORD(WINAPI * PNS_DLL_INIT_FN)(_In_ DWORD dwNetshVersion, _Out_ PVOID pReserved)
#define REG_OPTION_NON_VOLATILE
#define IsEqualGUID(rguid1, rguid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
struct _CONTEXT_ENTRY * pSubContextHead
struct _CONTEXT_ENTRY * pNext
struct _DLL_LIST_ENTRY * pPrev
struct _HELPER_ENTRY * pSubHelperTail
NS_HELPER_ATTRIBUTES Attributes
PDLL_LIST_ENTRY pDllEntry
struct _HELPER_ENTRY * pNext
struct _HELPER_ENTRY * pPrev
PNS_HELPER_START_FN pfnStart
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_In_ ULONG _In_opt_ PVOID pvData
#define HKEY_LOCAL_MACHINE