https://bugs.documentfoundation.org/show_bug.cgi?id=122034

Hossein <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Hossein <[email protected]> ---
Created attachment 191780
  --> https://bugs.documentfoundation.org/attachment.cgi?id=191780&action=edit
Imports from modules in all DLL files inside instdir/program

Re-evaluating the EasyHack in 2024

This issue is still relevant, as there are many places in the code that need
change. For example, consider these results

$ Dependencies.exe -imports instdir/program/gdipluscanvaslo.dll

In the output, these are the external DLL modules:

Windows API modules:
GDI32.dll
gdiplus.dll
USER32.dll
KERNEL32.dll

Visual C++ runtime modules:
MSVCP140D.dll
VCRUNTIME140D.dll
VCRUNTIME140_1D.dll
ucrtbased.dll

One should focus on the first set, which belongs to Windows API. For the first
set, there are many imports, and the EasyHacker should have a list of
deprecated functions to search among them.

The attached is the output of running "Dependencies.exe" tool over all the DLL
files in instdir/program. It is created using this script:

for i in instdir/program/*.dll
do
    Dependencies.exe -imports $i >> dependency.txt
done
gzip dependency.txt

In a text editor, for example you can search for "CreateDIBPatternBrush ", and
then backward search for "Import listing for file" to see the
instdir/program/vclplug_winlo.dll, which is part of LibreOffice. Then, if you
search for the CreateDIBPatternBrush (which is from GDI32.dll), you will find
that in vcl/win/gdi/gdiimpl.cxx:

HBRUSH Make16BitDIBPatternBrush(Color nColor);
https://opengrok.libreoffice.org/xref/core/vcl/win/gdi/gdiimpl.cxx?r=956dc23f#1454

The replacement function is usually mentioned in the documentation. For
example, in link [1] provided by Mike one can see the CreateDIBPatternBrushPt
function introduced as a replacement:

"Note: This function is provided only for compatibility with 16-bit versions of
Windows. Applications should use the CreateDIBPatternBrushPt function."
[1]
https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createdibpatternbrush

I mark this EasyHack as difficultyMedium.

The attachment is created using the latest LO dev master sources:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1bde4e6ff4bfcc922c7117d9d0528ce0c7f1adc5
CPU threads: 20; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to