View Single Post
  #6  
Old 04-08-2020, 22:02
Carldric Clement's Avatar
Carldric Clement Carldric Clement is offline
Registered User
 
Join Date: Aug 2014
Location: Toboh, Sabah, Malaysia
Posts: 547
Thanks: 560
Thanked 559 Times in 206 Posts
Carldric Clement is on a distinguished road
Quote:
Originally Posted by Cesar82 View Post
This code also works here.
Perhaps the implementation of some other function in the BLACKFIRE69 library may interfere with the callback (that may be it).
Your code cmd is very interesting for me.
If you just leave "uses Windows" in project, adding process message function and build with DELPHI 2010 the cmd.dll finally will be 33.0 KB (33,792 bytes) or 17.5 KB (17,920 bytes) using UPX level 9.
Thanks!
yeah you're right.
after that I just leave the "uses Windows" and create the process messages function like this:
Code:
function ProcMsg: boolean;
var
  msg: TMsg;
begin
  while PeekMessage(msg, 0, 0, 0, PM_REMOVE) do
  begin
    TranslateMessage(msg);
    DispatchMessage(msg)
  end;
  Result := false;
end;
the size of dll after build will be 51kb (51,712 bytes) then use with upx level 9 turns to 23kb (23,040 bytes). actually I use Delphi XE 10.3 Community Edition.
__________________
EDM Producer.

Last edited by Carldric Clement; 04-08-2020 at 22:08.
Reply With Quote