-
Content Count
1977 -
Joined
-
Last visited
-
Days Won
26
Everything posted by Attila Kovacs
-
Any GraphQL implementation out there?
Attila Kovacs replied to Javier Tarí's topic in Network, Cloud and Web
Cool 😉 -
Suggestion: Debugger inspection templates for complex types
Attila Kovacs replied to Lars Fosdal's topic in Delphi IDE and APIs
Ah that, I see, you're right, no prob at all. -
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
-
Navigation Toolbar
-
Using translations in unit Consts with Delphi 10.4 VCL
Attila Kovacs replied to Dirk Janssens's topic in 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 -
Suggestion: Debugger inspection templates for complex types
Attila Kovacs replied to Lars Fosdal's topic in Delphi IDE and APIs
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. -
Suggestion: Debugger inspection templates for complex types
Attila Kovacs replied to Lars Fosdal's topic in Delphi IDE and APIs
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) -
Nothing, I was unsure how to translate it properly without surprises later. I took some C or C# example as a base.
-
@Anders Melander yes, sorry, forgot to mention, that was under the link from @qubits, where they changed "var pps: pointer" to "out pps: IPropertyStore"
-
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.
-
simple SFTP-like server for Windows?
Attila Kovacs replied to David Schwartz's topic in General Help
It's fast and it's better as rsync for my task. Thx! -
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.)
-
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.
-
Found it in the registry but there must be something in the IDE to clear those lists, mustn't it?
-
because there is no instance of anything?
-
don't use gmail for transferring exe's, there is no MTA on the world letting exe's through use defender move on
-
You did not specify any problems, so these are coming to my mind right now.
-
I can't help you understand it but I'd suggest you to check the SetString() methods.
-
simple SFTP-like server for Windows?
Attila Kovacs replied to David Schwartz's topic in General Help
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. -
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?
-
I mean on field base. Like field varchar(10), clientcodepage utf16, can you fetch 'AAAAA' (5) but not 'AAAAAA' (6)?
-
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)
-
Remote Delphi developer position
Attila Kovacs replied to naveed's topic in RTL and Delphi Object Pascal
you just failed using a simple forum by posting this under "RTL and Delphi Object Pascal" -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
wow, didn't know that function, have to check!! -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
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?