-
Content Count
1943 -
Joined
-
Last visited
-
Days Won
25
Everything posted by Attila Kovacs
-
@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? -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
that won't help much as out parameter also taking inputs without any warnings, which is more screwed as the original problem -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
A variable has to be initialized before being passed to a ref param, yes you have to decorate with "ref" or "out" -or whatever- the parameters at call: myproc(ref param1, out param2); <- this is the call, not the definition! you _have_ to set an "out" parameter before using it or before returning from the routine, even if you won't use that value (see my example) who knows what else... And I'm afraid this is because you can't just show hints for coding guidance as they will first disappear when you do what the compiler wants you to do. So it would be basically an error, like in c#. Am I right? Do we need that? -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
but c# does not only giving hints, it is enforcing a lot of things. or is it possible to turn them off? -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
Why is it relevant how c# works? It's completely different. won't compile: bool a(out int i) { if (1 != 2) return false; i = 43; return true; } -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
This is more interesting to me, no hint, but I could pass values from b() to a(): procedure a(out sl: TStringList); begin showmessage(sl.text); end; procedure b; var sl: TStringList; begin //sl := TStringList.Create; //sl.Add('hi'); a(sl); end; I'd stick with "var" parameters and no superfluous hints... -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
Why are you using "var" then? Why do you need the hint? -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
OK, but it's not wrong passing uninitialized variable to a var parameter. Why the hint then? -
Using uninitialized object works on Win32, throws AV on Win64
Attila Kovacs replied to aehimself's topic in General Help
Really? And what if the var in the sub-roc is passed further? How deep do you want the compiler work for you? What if the decision is based on a variant? Should the compiler evaluate every outcomes? How slow should be the compiler just for your entertainment? Buy TMS FixInsight, write unit tests and first of all, develop a coding pattern which doesn't even uses such pitfalls.