Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
RatinCN committed Dec 22, 2024
1 parent 9919c58 commit 8648dfe
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
15 changes: 7 additions & 8 deletions Source/KNSoft.MakeLifeEasier/Process/Remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ PS_GetMachineType(
return PS_GetMachineTypeFromFile(ProcessHandle, MachineType);
}

HRESULT
NTSTATUS
NTAPI
PS_GetRemoteAddressName(
_In_ HANDLE ProcessHandle,
Expand All @@ -160,7 +160,6 @@ PS_GetRemoteAddressName(
_Outptr_opt_result_maybenull_ PUNICODE_STRING* SymbolName,
_Out_opt_ _When_(SymbolName == NULL, _Null_) PULONGLONG SymbolDisplacement)
{
HRESULT hr;
NTSTATUS Status;
USHORT Bits;
LDR_DATA_TABLE_ENTRY64 DllEntry64;
Expand All @@ -177,7 +176,7 @@ PS_GetRemoteAddressName(
Status = PS_GetMachineBits(ProcessHandle, &Bits);
if (!NT_SUCCESS(Status))
{
return HRESULT_FROM_NT(Status);
return Status;
}

/* Get module full path */
Expand All @@ -190,7 +189,7 @@ PS_GetRemoteAddressName(
}
if (!NT_SUCCESS(Status))
{
return HRESULT_FROM_NT(Status);
return Status;
}
if (Bits != 32)
{
Expand All @@ -201,11 +200,11 @@ PS_GetRemoteAddressName(
}
if (!NT_SUCCESS(Status))
{
return HRESULT_FROM_NT(Status);
return Status;
}
if (SymbolName == NULL)
{
hr = S_OK;
Status = STATUS_SUCCESS;
goto _Exit_0;
}

Expand Down Expand Up @@ -272,7 +271,7 @@ PS_GetRemoteAddressName(
PE_SymCleanup();
_Exit_1:
*SymbolName = SymName;
hr = SymName == NULL ? S_FALSE : S_OK;
Status = STATUS_SUCCESS;
_Exit_0:
if (ModulePath != NULL)
{
Expand All @@ -281,5 +280,5 @@ PS_GetRemoteAddressName(
{
PS_FreeUnicodeString(DllPath);
}
return hr;
return Status;
}
2 changes: 1 addition & 1 deletion Source/KNSoft.MakeLifeEasier/Process/Remote.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ PS_GetRemoteModuleEntryByAddress32(
_Out_ PLDR_DATA_TABLE_ENTRY32 ModuleEntry);

MLE_API
HRESULT
NTSTATUS
NTAPI
PS_GetRemoteAddressName(
_In_ HANDLE ProcessHandle,
Expand Down
1 change: 0 additions & 1 deletion Source/KNSoft.MakeLifeEasier/UI/GDI.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ UI_GetFontInfo(

#pragma region Bitmap and Icon

/* See also: https://learn.microsoft.com/en-us/windows/win32/gdi/storing-an-image */
W32ERROR
NTAPI
UI_WriteBitmapFileData(
Expand Down
5 changes: 5 additions & 0 deletions Source/KNSoft.MakeLifeEasier/UI/GDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ UI_CreateBitmap(
return CreateDIBSection(NULL, &Info, DIB_RGB_COLORS, Bits, NULL, 0);
}

/// <summary>
/// Writes bitmap (DDB) data to buffer
/// <see href="https://docs.microsoft.com/en-US/windows/win32/gdi/storing-an-image">Storing an Image - MSDN</see>
/// <see href="https://docs.microsoft.com/en-us/windows/win32/gdi/bitmap-storage">Bitmap Storage - MSDN</see>
/// </summary>
MLE_API
W32ERROR
NTAPI
Expand Down
2 changes: 1 addition & 1 deletion Source/KNSoft.MakeLifeEasier/UI/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ UI_EnumChildWindows(
FORCEINLINE
LOGICAL
UI_Redraw(
_In_ HWND Window)
_In_opt_ HWND Window)
{
return RedrawWindow(Window, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);
}
Expand Down

0 comments on commit 8648dfe

Please sign in to comment.