Jump to content

Vandrovnik

Members
  • Content Count

    583
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Vandrovnik

  1. Vandrovnik

    Q for MAPI Expert

    There is another small one (missing "W"), which probably makes no problem now: in mwWide, original code: FillChar(LMapiMessageW, SizeOf(LMapiMessage), 0); please change to FillChar(LMapiMessageW, SizeOf(LMapiMessageW), 0);
  2. Vandrovnik

    Q for MAPI Expert

    Thank you for the unit! I have found a bug regarding attachments in mvAnsi mode (two times there should be TMapiFileDesc instead of TMapiFileDescW; ^ is missing in FillChar). Original code: if LAttachCount > 0 then begin GetMem(LAttachments, SizeOf(TMapiFileDescW) * LAttachCount); FillChar(LAttachments, SizeOf(TMapiFileDescW) * LAttachCount, 0); Please change to: if LAttachCount > 0 then begin GetMem(LAttachments, SizeOf(TMapiFileDesc) * LAttachCount); FillChar(LAttachments^, SizeOf(TMapiFileDesc) * LAttachCount, 0); I have also added a simple procedure SetMapiDll (on clients computers, GroupWise is installed and used. Outlook 2019, which is also installed, but not used, keeps overwriting the registry entry, so I will probably have to load directly C:\Program Files (x86)\Novell\GroupWise\gwmlt1.dll there). procedure SetMapiDll(const AMapiDll: string); begin MAPIDLL:=aMapiDll; end;
  3. Vandrovnik

    How do I check for empty rows in a string grid?

    In your code, I cannot see initial setting of grid.RowCount.
  4. Vandrovnik

    Getting bitmap from an ImageList source

    In design time: could you just copy whole imagelist and then delete unneeded images from it?
  5. Vandrovnik

    What is the correct approach to "phone home"?

    I vote for 3) - I am using this approach too.
  6. Vandrovnik

    Binary data in String?

    But even when I put #129 in txt file (Notepad, Alt+0129) and save it, it is saved as bytes C2 81. Notepad does not display there any character, but it is present (cursor "stays" there when using arrow on keyboard).
  7. Vandrovnik

    Micro optimization: Math.InRange

    Yes, but if you disable these checks, results for ascending intervals are OK.
  8. Vandrovnik

    Micro optimization: Math.InRange

    IsInRangeEx looks OK for interval in ascending order. But in these cases, first one returns false, second one true: writeln(IsInRangeEx(10, 12, 8)); writeln(IsInRangeEx(316084043, 3932079699, 3000547150));
  9. Vandrovnik

    Micro optimization: Math.InRange

    I think it does not produce such jumps:
  10. Vandrovnik

    Micro optimization: Math.InRange

    I used "inc(x);" for 64bit (global variable). You can have nop in a procedure: procedure Nop; assembler; asm nop end; But as far as I know, this procedure cannot be inlined, so there will be a call.
  11. Vandrovnik

    Micro optimization: Math.InRange

    When you have something after "then", things change. if ... then asm nop end; 32bit: Math.InRange: 1081 IsInRange: 1078 If: 1077
  12. Vandrovnik

    Micro optimization: Math.InRange

    Your cLoop constant is out of range, so I deleted one zero. Results on an old i7 920, Delphi 10.4.2 Pro, Release: 32bit: Math.InRange: 1083 IsInRange: 766 If: 759 64bit: Math.InRange: 722 IsInRange: 725 If: 721 K.
  13. Vandrovnik

    Simple FMX Win32 app hangs

    Hello, I have this simple error demonstration. Please can you look at it, whether there is a mistake in the app? When not, I would report it to QC. Steps to reproduce: 1. click Show form B 2. click Show form C 3. close form C 4. close form B 5. click Show form B 6. click Show form C ---> application freezes This error does not happen: - if I remove TBasicFormForm.FormClose event handler (which contains just a comment) or - if I change in ObjectInspector tSecondaryForm.BorderIcons, so that it is [biSystemMenu, biMinimize, biMaximize] Kind regards, Karel Test75.zip
  14. Vandrovnik

    "Divided by zero" exception

    Try 1/0 and 0/0 on Wolfram Alpha: https://www.wolframalpha.com/input/?i=0%2F0
  15. Vandrovnik

    "Divided by zero" exception

    In Delphi 10.4.2, this: uses System.SysUtils, System.Math; var a, b, c: double; begin try SetExceptionMask([]); a:=0; b:=0; c:=a/b; Writeln(c); except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Readln; SetExceptionMask(exAllArithmeticExceptions); raises the exception: EInvalidOp: Invalid floating point operation When "a" is 1, the exception is: EZeroDivide: Floating point division by zero When I do not call "SetExceptionMask(exAllArithmeticExceptions);" in the end, I get: Runtime error 216 at 004067EA
  16. Vandrovnik

    "Divided by zero" exception

    And what is wrong with SetExcepionMask to desired value? http://docwiki.embarcadero.com/Libraries/Sydney/en/System.Math.SetExceptionMask
  17. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    Patch for the patch has been released.
  18. Hello, If you fix the bug in original files (C:\Program Files (x86)\Embarcadero\Studio\21.0\source\IBX\IBX.IBSQLMonitor.pas?), it should be enough to add this file to your project and rebuild the project. Kind regards, Karel
  19. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    Yes, the situation with severe bugs is strange and I wonder, if other software have similar problems. When paying customer is not able to work with big projects more then two months, it is like if he buys a new car with six-speed gearbox, but could use only speeds 1-4 with the information, that speeds 5-6 will be repaired sometime in the future, without any specific date.
  20. Hello, In deployment manager, I have some files for Android32 and some other files for Android64. When I create .apk for Android32, it contains all files that were set for this target. Also .apk for Android64 contains all files that were set for it. But when I create .aab (which contains 32 and 64 bits versions of the app) to publish on Google Play, it contains only assets files for Android64. Is it a bug, or a "feature"? When I add files for Android32 to Android64 too, it will probably work, but the download size will be bigger than necessary... Kind regards, Karel
  21. Vandrovnik

    Android .aab - assets for Android32 missing

    Well, I can select, that a file is for Android as well as for Android64. But when I do it, it is not stored in the .aab file at all...
  22. Vandrovnik

    Android .aab - assets for Android32 missing

    Ehm, now I found out that in the column "Platforms" in deployment manager, I can select more values... But still do not know how to do it properly so that file A is included in .aab, but distributed to 32-bit devices only.
  23. Vandrovnik

    Android .aab - assets for Android32 missing

    Yes, Delphi 10.4.2 Pro. May be I am doing it wrong. Let's say I have: - file A for Android 32 - in deployment manager, it has two rows (Android - Release, Android - Debug). - file B for Android 64 - in deployment manager, it has two rows (Android64 - Release, Android64 - Debug). Now when I create .aab file for Release, Application store (with checked option "Generate Android 32-bit and 64-bit binaries), this .aab contains only file B. So I have to place file A to deployment manager for Android 64 bit too (this was my mistake: I thought Delphi takes this file automatically). But I guess Google Play will never be able to recognize that this file A is for 32-bit Android only and will deliver it to all devices. And probably will also deliver file B to 32-bit devices...
  24. Vandrovnik

    Several F2084 Internal Error on Delphi 10.4.2

    I have almost no problems, but my projects are smaller - the largest one is about 1.5 M lines of code. I use no runtime packages and since I stopped to use their translation manager, I do not use project groups anymore (to be more precise, there is only one project in the project group). VCL apps for Win32 and Win64. FMX apps for Win32, Win64, Android32, Android64, but these are much smaller.
  25. Hello, I use Better Translation Manager from @Anders Melander to create language modules. This works fine even with 10.4.2. In the application, I use resourcestrings. BTM translates them and saves them to, for example, .DEU file for German translation. I have checked with Resource Hacker that translated resourcestrings are there. In the application, I load resource file, it works for components. Unfortunatelly, when I use resourcestring in the application like MyButton.Caption:=xxZavrit (resourcestring), it is not correctly loaded from .DEU file (it is loaded from .exe instead). It was working fine in 10.3.3, but does not work in 10.4.2. Were there any changes regarding loading resourcestrings? I am using an old function which sets new resource file in place: function SetResourceHInstance(NewInstance: HModule): HModule; var CurModule: PLibModule; begin CurModule := LibModuleList; Result := 0; while CurModule <> nil do begin if CurModule.Instance = HInstance then begin if (CurModule.ResInstance <> CurModule.Instance) then FreeLibrary(CurModule.ResInstance); CurModule.ResInstance := NewInstance; Result := NewInstance; Exit; end; CurModule := CurModule.Next; end; end; Kind regards, Karel
×