if (!NT_SUCCESS(Status) && (Status != STATUS_DLL_NOT_FOUND))
{
/* Failure */
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - call to LdrpCheckForKnownDll(\"%ws\", ...) failed with status %x\n",
__FUNCTION__,
DllName,
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Expanding full name of %wZ\n",
__FUNCTION__,
OriginalName);
/* Check which output to use -- failure or success */
if (NT_SUCCESS(Status))
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Expanded to %wZ\n",
__FUNCTION__,
*ExpandedName);
}
else
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Failed to expand %wZ; 0x%08x\n",
__FUNCTION__,
OriginalName,
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Looking for %ws in %ws\n",
__FUNCTION__,
DllName,
/* FIXME: Handle relative case semicolon-lookup here */
/* Calculate length */
- Length += (ULONG)wcslen(DllName) + sizeof(UNICODE_NULL);
+ Length += (ULONG)wcslen(DllName) + 1;
if (Length > UNICODE_STRING_MAX_CHARS)
{
/* Too long, fail */
/* Display debug output if snaps are on */
if (ShowSnaps)
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Looking for %ws\n",
__FUNCTION__,
Buffer);
/* Check which output to use -- failure or success */
if (NT_SUCCESS(Status))
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Returning %wZ\n",
__FUNCTION__,
*ExpandedName);
}
else
{
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Unable to locate %ws in %ws: 0x%08x\n",
__FUNCTION__,
DllName,
sizeof(NameBuffer))
{
/* No space to add the extension */
- DbgPrintEx(81, //DPFLTR_LDR_ID,
- 0,
+ DbgPrintEx(DPFLTR_LDR_ID,
+ DPFLTR_ERROR_LEVEL,
"LDR: %s - Dll name missing extension; with extension "
"added the name is too long\n"
" DllName: (@ %p) \"%wZ\"\n"