#1 Re: mORMot 2 » TSynTempBuffer used in RunCommandWin question » Yesterday 01:41:11

Oh that's neat, never seen that done before and I had to find out how it worked. Thanks for your reply.

#2 mORMot 2 » TSynTempBuffer used in RunCommandWin question » 2025-08-20 22:09:38

DawgBuddy
Replies: 2

Hi ab, whenever I need ideas on how to do something I always grep your mormot2 source. Today I was wanting different ideas on using the ReadFile api and I found how you used it in mormot.core.os.windows.inc in the RunCommandWin function. However, I'm confused on how the TSynTempBuffer var is being used with ReadFile.

var tmp: TSynTempBuffer;

Win32Check(ReadFile(rd, tmp, pending, n, nil));

I didn't see a custom ReadFile function in your code so should that be tmp.buf which is how it's used in other lines or am I not seeing something correctly?

Thanks for all the code you've coded!

Board footer

Powered by FluxBB