Sunday, October 10, 2021

How to fix Undear Engine 4 Api-ms-win-downlevel-kernel32-l2-1-0.dll not found

 UnreadEditor does not start because Api-ms-win-downlevel-kernel32-l2-1-0.dll not found?

Solution is simple:

  • Open Explorer. 
  • Go to c:\Windows\System32\CompatTel\
  • Locate the DLL and copy it to c:\Windows\System32\


Thursday, November 12, 2020

How to see who wakes up the harddrive (HDD) from sleep?

Usually I have my D: drive sleeping because it is too loud.
But sometimes, without obvious reason somebody wakes it up.

To see who does that, you need to  install the Sysinternals Process Monitor (Microsoft website).
At startup you need to cancel the filter dialog that will be presented.

In the program, under the Filter main menu, tick Enable Advanced Output and Drop Filtered Events.
Then in the same menu, create (Ctrl+L) a filter rule like this:
          "Path contains D:\", then click the "Include" option.


Now keep the program running until you see who accesses the D: drive.

Friday, November 6, 2020

PaintShop Pro won't save images as JPG (Fixed)

Today I was not able to save anymore images in PainShop Pro as jpg (png will work). PainShop Pro will simply freeze if I try to do this.

The issue: a clipboard monitor called PureText was conflicting with PainShop Pro. Closing the program solved the issue.  

I have no clue why the programmers of PainShop Pro chose to hook to the clipboard while saving the output as JPG but obviously is not only pointless but also poorly implemented.

Case solved.

Saturday, November 2, 2019

How I fixed blurry/fuzzy camera image on Samsung Galaxy s6?

How I fixed blurry/fuzzy image on Samsung Galaxy s6?

The solution was amazingly simple: shake the phone very aggressively!. Looks like the camera actuator mechanism sometimes gets stuck in a certain position. This will fix it.

Saturday, July 20, 2019

Can you tell if the machine on which you are running is a virtual machine installed secretly by some malware/hacker?

Somebody asked me: can you tell if the machine on which you are running is a virtual machine installed secretly by some malware/hacker?




I thought about that question and the answer is SURE. Without any doubt.
A virtual machine will consume some resources by itself (quite a lot). If you observe these missing resources you can figure out that something is wrong.





Method 1 - Graphics

You don't even need to start a program to accurately measure the missing resources.
You can tell if the machine in which you are running is a virtual machine or not, simply by running a game.
Most virtual machines have problems with accelerated graphics. Simply put, you cannot play resource-intensive 3D games in a virtual machine.



Method 2 - RAM

Now to tell exactly if you are running in a virtual machine, you don't need advanced hacker tools. Simply press Ctrl+Shift+Esc to start TaskManager. Under "Physical Memory (MB)" and watch the 'Total' field. In my case is shows 32GB which is indeed the amount I have physically installed. This number can be also seen in the Control Panel\All Control Panel Items\System (Win+Break key).


Method 2 - CPU

Another method is to run a tool like (Hardware ID Extractor) that gives you the theoretic speed of the CPU and the real (measured) speed of the CPU. If real speed of the CPU is smaller than the theoretic speed, then something is fishy.

Also the CPU ID might give info about this. I will investigate it.



Remember: also collaborate the data shown by software with writes on your actual CPU/RAM.









Friday, October 26, 2018

KSDev released this year CrossVCL - a framework that allows you to build multi-platform applications.

What is the difference between Firemonkey and CrossVCL?
If you want to make your current app multi platform, you need to port it to Firemonkey. With CrossVCL you don't need anything!!!

Embarcadero should fear them!
And learn a lesson form them!

They really upgraded Delphi/C++ programming to a brand new level!

Thursday, February 15, 2018

Cool features and functions in Delphi

 

List of IDE features that are cool (when they work)

  • Search backwards - Ctrl+F to do a search in your code. F3 to go to the next position Shift+F3 to go to previous position.
  • Move/Relocate/Rename project's files directly from Project Manager
  • Navigate to recently modified code - Ctrl+Shift+F7 and Ctrl+Shift+F8
  • Search for usage - Right click a variable and invoke 'search for usage'. A panel will list all places in current project where that variable is used. In my cases this will make the IDE to freeze. 
  • UML diagrams (Live Diagrams) - simply doesn't work 
  • IDE insight (F6) - It could be useful but seems to list a lot of random items.
  • CodeSite - a logging system - I couldn't really find it useful
  • AQTime - Performance profiler + memory allocation debugger - I couldn't really find it useful


List of functions/units/classes that are cool (when they work)

  • SysUtils.GetHomePath - Returns c:\users\username\appdata\roaming.
  • IOUtils - Lots of new cool functions. Totally broken.
  • SplitString - Example of usage at the end of this document. Unfortunately, the function is VERY slow!
  • FindCmdLineSwitch - Example: System.SysUtils.FindCmdLineSwitch('-f', sFileName)
  • TThread.ProcessorCount;   { Specifies the number of CPU cores in the system }
  • TBinaryReader / TBinaryWriter - Nice but only half ass - Interesting but I recommend this library which is much faster: https://stackoverflow.com/questions/5639531
  • System.Diagnostics.TStopWatch - Can be used to precisely time your code.
  • $WeakLinkRTTI - Put these two directives in your DPR file (at the very top) to reduce exe size with 4%: {$WEAKLINKRTTI ON} {$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
  • TStringBuilder - It was supposed to help you build strings. But it is horrible! Simply don't use it. It is painful slow.
  • PtInCircle & PtInRect - Tells you if a point is located in a circle. Could be handy one day.
  • TTimeSpan (System unit) is a data structure used for holding information about a period of time. The smallest unit of time is a tick which is 100 nanoseconds. The largest unit of time is a day.
CONST
  • SLineBreak - global constant that changes its value depending on target platform (Win/Linux/Mac)
  • Win32MajorVersion & Win32MinorVersion - To get current Windows version


List of VCL controls that are cool (when they work)

  • TJumpList - To list a custom file in a JumpList your program must be registered (in Windows registry) to be able to open that type of file. Another problem is that when the user clicks a 'recent file' in the JumpList, the message is not sent to your app directly. You need to intercept that message.









_________________________________

function CountWords(CONST s: string): Integer; { Might be faster than the one above }
VAR
   sArray: TStringDynArray;
begin
  sArray:= System.StrUtils.SplitString(s,  '.,? =<>*!-:;()/\'+cr+lf);
  Result:= Length(sArray);
end;


Wednesday, November 22, 2017

Fix Firefox v57 (Firefox Quantum) high memory utilization (for computers with 4GB RAM or less)

When Firefox Quantum was launched everybody praised it as the next best thing (browser).
But if you look closelly you will only see modest speed improvements into the browser. HOWEVER, you will see massive slowdowns in Windows. At least I did in mine. Why because instead of taking 600-900MB for regular browsing the new Firefox takes not 2GB!

This is because a thing called "multi-process Firefox" was activated by default. The multi-process was suposed to make Firefox more stable. However, it also makes the browser much much larger.

So, how do you make Firefox behave? You disable multi-process:
1. Type "about:config" in Firefox Address bar (where you enter the address of a website).
2. Do a search for "browser.tabs.remote.autostart"
3. Disable it.

_________________

More gory details about this here:
https://www.ghacks.net/2016/07/22/multi-process-firefox/
TLDR

Thursday, November 9, 2017

False antivirus reports on installers created with WinRAR


I recently observed that Setup files created with WinRar have a high false positive detection rate from antiviruses.
Here are the conclusions of some test I made, in order to reduce the false positive rate:

RAR version    SFX module     Detection ratio
WinRar 3.11      32bit             1/66
WinRar 4.2       32bit?            3/66
WinRar 5.50      32bit             6/67
WinRar 5.50      64bit             1/67

Notes:
The detection ratio is not affected by the 32/64 bit version of WinRAR program at all.
However, it is strongly affected by the SFX module used.

The test file created with WinRar was named Setup.exe and it contained a single URL file in it.
In one test, the Setup file was packed with UPX. This reduced the detection ratio from:
 8 false positives to only 4
 6 false positives to 6 (no reduction), in other case

A program built in Delphi raises more false positives if the 'Compiler optimizations' is on.

Friday, November 3, 2017

Thunderbird cannot connect to gmail after changing password [FIXED]

0) ALLOW LESS SECURE APPS: Login to gmail using your browser, switch to your google account (top-right round button), go to Sign-in & Security>Connected apps & sites, scroll down until reach Allow less secure apps:OFF and turn it ON (if it's already on, leave as it is);

1) DELETE OLD GMAIL PASSWORD: Launch Thunderbird, select Preferences>Security>Passwords>Saved Passwords, select the gmail account from the list and click Remove; 2) CHANGE GMAIL ACCOUNT SETTINGS: Launch Thunderbird, go to Tools>Account Settings>Server Settings of the gmail account you need to bring back to work, switch Authentication Method from Oauth2 to Normal Password and click OK (when requested by Thunderbird, digit the new gmail password);

3) Scroll down to the end of your account list on the left side of the window until you reach Outgoing Server (SMTP) and select it; 4) Select your gmail address from the list, click Edit, switch the Authentication Method to Normal Password as well and click OK

How to fix invalid Google Drive quota!

I recently have seen that 25% of my GDrive quota was occupied by something. But my GDrive has in it only 0.7GB. So, who gets the rest of the space.
It turns out that there are files in my Google Drive that are not assigned to a folder. Therefore they are "hidden" from view.

To see these files just click this link:
https://drive.google.com/drive/search?q=is:unorganized%20owner:me
Review what you want to keep/delete (probably you will delete them all) and get rid of them. Don't forget to empty your trash also.

No my quota shows only 6% occupied.

Friday, September 1, 2017

Yet another EurekaLog bug. How many until now?

I stepped last week in a multiple-bug situation with EurekaLog for Delphi. I again wasted MORE than a day with this buggy "exception tracer tool".

My DRP file is like this:

PROGRAM MyProgram;
uses
  {$ifdef win32}fastmm4,{$endif}
  EurekaLog_units_come_here

This worked fine until I compiled the program to 64 bits.
On 64 bit, EurekaLog refused to work. After lots of emails exchanged with their (slow) customer support I got NOTHING.
In the end I have found the problem: a bug (oh yes, another one) in EurekaLog. Eureka v7.4 could not properly parse the DRP file when it contains conditional directives like {$ifdef}.
So, because EurekaLog parse my dpr file was like this

 
PROGRAM MyProgram;
uses
  {$ifdef win32}fastmm4,
  EurekaLog_units_come_here
  {$endif}

Solution? None. The support guy from EurekaLog (Alex) invided me to pay for a new license on order to get a small update (same version, so update, no upgrade) to v7.5 which allegedly works. I won't do that. I should receive the UPDATE to the non-bugged version for free AT LEAST for the reason that I have invested time to help them locate the bug.

________________

Maybe they should write a bug tracker tool for their one bug tracker tool :)

Monday, August 14, 2017

Delphi programs have too many false positive detections

Most of my Delphi programs are flagged as virus by some antivirus programs. Some of these antivirus programs are really cheap/under-the-table products (such as Baidu and Comodo) other are big (TOP) name like Kaspersky.

In theory you should report a false positive to the antivirus producers so they can fix their bug but if the list is too long and you are lazy here is what you can do to decrease the number of false positive reports:
  • Don't turn on "compiler optimizations" when you release your app. It seems that more false alarms are triggered when this is turned on in the project.
  • If you MUST turn one the "compiler optimizations" you can pack your exe with UPX. This should shut up most antiviruses as they don't know to look inside the UPX
  • If you use WinRar, downgrade to v3.11 as this version does not give false positives (only one out of 64).

Tuesday, March 21, 2017

How to configure EurekaLog to send bugs via email

Email sender settings in EurekaLog v7
 


SMTP Server [1] Simple MAPI MAPI Shell (MailTo) SMTP client [3]
Can attach the ELP file Yes Yes [2] Yes [2] NoYes
See sender's email No [4] Yes Yes YesNo
Email client software* Not required Required Required RequiredNot required
Chance of success Highest chance among all methods High if email client installed WinMail & Outlook only!! High if email client installedI get a 'revocation function' error but for others is working
Can tell if email was successfully sent? No  Yes Yes Yes
Yes


1 - Many antivirus products will flag your EXE as virus


2 - if "Append bug report text in the message text" is UNCHECKED

3 - Typically, you should use either SMTP server or SMTP client, but not both methods simultaneously.
Bugged in EurekaLog v7.4.8.0 RC 1 - Error code = -2146885613 - The revocation function was unable to check revocation because the revocation server was offline. Maybe because: “Currently EurekaLog supports AUTH LOGIN and AUTH PLAIN authentication methods”?

4 - could be enabled via SetUserEMail function)
* If required: Email client must be installed and properly reconfigured. User must to click on "Send" in their e-mail clients. Automatic send without user actions is not possible. 

_____________ 

Please note that EurekaLog v7 is also plagued with several serious bugs! I contacted the producer but he didn't bother to reply until now.
 

Wednesday, March 15, 2017

Another bug in EurekaLog 7

I wanted to send an email ("Send via SMTP client") from EurekaLog v7.4.8.0 RC 1 but I was getting this error:

FAILED: Error code = -2146885613
The revocation function was unable to check revocation because the revocation server was offline
 
EurekaLog 7.4.8.0 RC 1
Testing send with TELMailSMTPClientSender
Options:
_BugAppVersion="21.0.17707.5020"
_BugID="73D40000"
_BugIDSource="bds.exe


 
My email is hosted by BlueHost but knowing how buggy EurekaLog is and considering the fact that all my accounts work flawlessly in Thunderbird I think the bug is not related to the BlueHost server.

I had to give up using "SMTP client" and user "SMTP server" instead.



 

Tuesday, January 3, 2017

Total Commander - the ultimate file manager for Windows (and recently for Android too)

Total Commander (aka Windows Commander) is the ultimate file manager for Windows (and recently for Android too).

Who can use it?
The regular Windows user that used all his life Windows Explorer will find Total Commander interface AT LEAST awkward. The interface concept and user experience is totally different in Total Commander. This doesn’t mean that Total Commander is bad or poorly design or difficult to learn. It is just different than Windows Explorer.
The regular user will require a day or two to accommodate with the concept ( experienced users will have no problem to gasp the new concept) but the efficiency improvement totally worth it. I am a Total Commander use since 1998 and I never ever (literally) used Windows Explorer again.

The concept
Total Commander solves an old design flaw of Windows Explorer. So old that regular computer user won’t even observe it anymore.
Many operations that you perform on files involve copying or moving files from one place (folder) to another. This is where Windows Explorer design fails: you work on two folders, the folder from where you copy the file (source) and the folder where you copy the file (destination), but Windows Explorer has one single panel. The Microsoft solution is to browse and open both folders and carefully drag and drop the files from source to destination. I say carefully because it is easy to ‘un-carefully’ drop the files in the wrong folder. Obviously there are also other methods but they are even more time consuming than this one. And when you close the Explorer all that work invested into locating your folders is gone. You have to start all over.
For a person that performs 1-2 file operations per day it is not a big deal, but for an intermediate user or a POWER user this is time consuming and error prone.
And, here is the time and place where you install Total Commander. Total Commander brings the concept of two parallel panels: it always shows on screen the source folder AND the destination folder. Now all you have to do is to drag and drop the files from one pane to the other (advanced users can user F5 and F6 keys for copy/paste).
Total Commander will remember the last used folders and ALSO the recent folders you navigated through. So, if you worked on a folder few hours ago and you want to return to that folder, you don’t have to browse the entire folder structure to locate it again. Using the History (Alt+DownArrow) you are back there with just one click.

The magic never stops
Total Commander has literary hundreds of features that are not present in Windows Explorer: FTP, compression support, fully customizable toolbar (that totally replaces the Start menu), CRC control, Mime encoding, advanced multi rename tool, advanced search tool, support for plugins (there are also thousands of plugins for Total Commander), thumbnail view, quick view, color coded file types, etc, etc, etc.
One of the useful functions we will investigate now is the File Queue. With this function you can Queue a long list of file operations for later execution and….


Disclaimer: I have no affiliation with Total Commander, except my affection for it :)

Tuesday, September 20, 2016

The best and most reliable 3GB hard drive

I need a 3GB internal harddrive. Looking through statistic data from BackBlaze, it seems that Seagate is the worst solution because of it HUGE failure rate. Yes the prices are good for this drive but you don't want a cheap drive that will fail after 2 years. Right?
The next brand with high failure rate is Western Digital.
Both Seagate and WesternDigital drive have price in the 100 euros range.
Toshiba has a much better failure rate.
But the winner is HGST. It has a significant higher price (126 euro) but totally worth it.

Friday, August 19, 2016

Top Windows, HTML 5, WYSIWYG HTML editors


Do you need a free web editor that supports HML5? I needed one and I really had to waste some time to review some. Here are the conclusions (and the conclusions only). NOTE: See the 2017 update at the end of the post!

BlueGriffon  
2015
Price:  Free or 70 euros: http://www.bluegriffon.org/#whatsinside
Comment: Seems robust and mature

Maqetta     
Discontinued may 2013, but still online
Price: free
Kit size: 86MB
Conclusion: Difficult to Install. Needs Java 6!

LibreOffice 
2015
Price: free

OpenOffice.org     2014
It only has a web page editor (not web site builder)

Dreamweaver 
2015
Conclusion: Nice but way too expensive!

Microsoft Expression 2012
(discontinued)

openElement  2014
Free
Kits size: 47MB
  
oXygenXML Editor 2015
Conclusion: not tested yet  

TOWeb  2013
Conclusion: not tested yet  

WebStorm IDE
2013
Conclusion: not tested yet 

Based on: https://en.wikipedia.org/wiki/Comparison_of_HTML_editors
______________

UPDATE 2017

Stormy Website Builder is the ultimate tool for building a web site (CMS). It has a beautiful WYSIWYG html editor. You can have a site up an running in only 4 minutes.
Stormy Website Builder wants to be a lightweight alternative for Joomla CMS.


Tuesday, August 16, 2016

Delphi is still in Top 20... barely

Delphi is still in Top 20... but barely. It is the last one. It may fall any time.
Too sad....


Saturday, August 6, 2016

Embarcadero finally decided to fix SOME bugs in Delphi


In the new road map, Embarcadero finally decided to fix SOME bugs in Delphi.

It seems good news but hold your horses:
1. They not always keep their promise related to the road map.
2. There are not so many bugs
3. They won't do all the fixes at once, but until 2018
4. Until 2018 another 500 new bugs (AT LEAST) will be introduced
5. We have to pay (not 59 bucks but HARD money) to get that non-buggy version of Delphi.

And in the end, what the fuck are we so happy that Embarcadero is fixing some bugs? Is not a present, a gift from heavens! Those bugs SHOULD NOT BE THERE anyway!

So, thank you Embarcadero for finally thinking to fix some bugs and FUCK YOU.

PS: In the next road map maybe you will introduce an item likes "free updates".

http://community.embarcadero.com/article/news/16418-product-roadmap-august-2016