I know that there are many posts regarding my issue, I also read this post Delphi 11.2: CreateWindowEx fails thread on x64 but I am not able to understand what exactly I should do to overcome this problem. I am working on Cromis.DirectoryMonitoring Cromis.Utils.pas https://github.com/CPsoftBE/BackupOfCromis, below code CreateWindowEx() Returns 0 only for Delphi 11.2 / 64Bit.
Result := CreateWindowEx(WS_EX_TOOLWINDOW, CTSHiddenWindowName, '', WS_POPUP,0, 0, 0, 0, 0, 0, HInstance, nil);