Jump to content

Attila Kovacs

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Any GraphQL implementation out there?

    Cool 😉
  2. Ah that, I see, you're right, no prob at all.
  3. Attila Kovacs

    UnPinnable App

    this makes an app unpinnable: uses Winapi.Windows, Winapi.ShlObj, Winapi.ShellAPI, Winapi.ActiveX, Winapi.PropSys, Vcl.Forms, .. function MarkWindowAsUnpinnable(Ahwnd: hwnd): HResult; const VARIANT_TRUE = WordBool(-1); PKEY_AppUserModel_PreventPinning: TPropertyKey = (fmtid: '{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}'; pid: 9); var pps: IPropertyStore; hr: HResult; v: PROPVARIANT; begin hr := SHGetPropertyStoreForWindow(Ahwnd, IID_IPropertyStore, pointer(pps)); if Succeeded(hr) then begin // pps._AddRef; v.vt := VT_BOOL; v.boolVal := VARIANT_TRUE; hr := pps.SetValue(PKEY_AppUserModel_PreventPinning, v); // pps._Release; end; Result := hr; end; ... Application.CreateForm(TMainForm, MainForm); MarkWindowAsUnpinnable(Application.MainForm.Handle); I'm not sure about the pps._addref and pps._release, I would appreciate some help on that. thx
  4. Attila Kovacs

    What is this IDE feature called?

    Navigation Toolbar
  5. Attila Kovacs

    Using translations in unit Consts with Delphi 10.4 VCL

    This will only work if you have the sources for every components you are using and you also build them all at least once at building the release version aaaand your units will be found earlier than the dcu's in Delphi's lib directory. So it wasn't for me, I'm using this: const MY_SMsgDlgConfirm = 'Moooooooo'; implementation procedure HookResourceString(rs: PResStringRec; newStr: PChar); var oldprotect: DWORD; begin VirtualProtect(rs, SizeOf(rs^), PAGE_EXECUTE_READWRITE, @oldprotect); rs^.Identifier := Integer(newStr); VirtualProtect(rs, SizeOf(rs^), oldprotect, @oldprotect); end; initialization HookResourceString(@SMsgDlgConfirm, MY_SMsgDlgConfirm); No one ever complained about it. Was it originaly from you @PeterBelow? http://www.delphigroups.info/2/92/298063.html
  6. I'm not sure this would change anything as it works the same way. I have rather close debug windows and delete watches if I want step through the code, otherwise it's really slow.
  7. you could do that from an expert but accessing (copying) the memory from the applications thread is very slow and not always work (as expected)
  8. Attila Kovacs

    UnPinnable App

    Nothing, I was unsure how to translate it properly without surprises later. I took some C or C# example as a base.
  9. Attila Kovacs

    UnPinnable App

    @Anders Melander yes, sorry, forgot to mention, that was under the link from @qubits, where they changed "var pps: pointer" to "out pps: IPropertyStore"
  10. Attila Kovacs

    UnPinnable App

    Ok, with the changed signature (out param) following happens: 1. try pps = nil 2. pps.IntfClear on nil 3. SHGetPropertyStoreForWindow => pps.refcount = 1 4. program run 5. finally pps.InfClear end; with var parameter, casting to pointer: 1. try pps = nil 2. SHGetPropertyStoreForWindow => pps.refcount = 1 3. program run 4. finally pps.InfClear end; 1. With my additional addref()/release() the refcount number goes up to 2 but will be released at the end in any way because pps is going out of scope (Am I right?) 2. So I'd think, because pps is a local variable, I don't need any manual intervention to its refcount and therefore I don't understand the signature change to an "out param". I mean, it could be the proper translation, it also looks better without the pointer cast, but I can't see any advantages compared to the already implemented signature.
  11. Attila Kovacs

    simple SFTP-like server for Windows?

    It's fast and it's better as rsync for my task. Thx!
  12. Attila Kovacs

    Evaluate/Modify clear history

    Any idea how can I clear the Expression and New value history? (Eventually anybody knows where the value goes from the "Expression" if you accidentally press up or down? I have a suspicion that it goes there where the light goes from the fridge after closing its door.)
  13. Attila Kovacs

    Class properties

    ok, this is weird. the "through instance reference" is just a fake, an alias to a call to the static methods. that should not exist in the language.
  14. Attila Kovacs

    Evaluate/Modify clear history

    Found it in the registry but there must be something in the IDE to clear those lists, mustn't it?
  15. Attila Kovacs

    Class properties

    because there is no instance of anything?
  16. Attila Kovacs

    Virus? How odd.

    don't use gmail for transferring exe's, there is no MTA on the world letting exe's through use defender move on
  17. Attila Kovacs

    Is a number in a string of numbers??

    You did not specify any problems, so these are coming to my mind right now.
  18. Attila Kovacs

    vtString and vtWideString & vtAnsiString

    I can't help you understand it but I'd suggest you to check the SetString() methods.
  19. Attila Kovacs

    simple SFTP-like server for Windows?

    This SyncThing is really nice, there are also QNAP packages. let's see how fast is it compared to rsync. Combined with https://www.zerotier.com/ could be a powerful combo running in the background on the NAS'es.
  20. Attila Kovacs

    PC-specific memory corruption...?

    looks like it's a UTF8 encoded string, í (0xED) is for example 0xC3 (Ã) 0xAD probably 2 times encoded that you can see the code points or because of the cast?
  21. Attila Kovacs

    PC-specific memory corruption...?

    I mean on field base. Like field varchar(10), clientcodepage utf16, can you fetch 'AAAAA' (5) but not 'AAAAAA' (6)?
  22. Attila Kovacs

    PC-specific memory corruption...?

    Why is it relevant what's in the dataset after an error in the client lib? Clear or fill the memory in zeos prior to query the db, you should see that instead of the garbage now. Also, dump the raw result to disk on both pc's and compare. One side, you were mentioning VARCHAR somewhere and the other side you are setting the clientcodepage to UTF16. I don't know oracle but this is interesting. Maybe zeos calculates for varchar and server delivers in nvarchar? Could you do some selects where the actual data is the half of the maximum data etc.. to see the threshold for the error? Btw. are the actual RDBMS's also the same? (You and your collegue)
  23. Attila Kovacs

    Remote Delphi developer position

    you just failed using a simple forum by posting this under "RTL and Delphi Object Pascal"
  24. wow, didn't know that function, have to check!!
  25. as I mentioned before, to avoid the hints you have to act so you could make it an error instead of a hint or are you the guy who having 2 kilometer of hints after a build?
×