VO code vs. X# code
Posted: Tue Aug 31, 2021 8:42 am
Hello,
today I had to add functionality to read a files owner in one of my VO applications.
I have found the following C code:
https://docs.microsoft.com/en-us/window ... ect-in-c--
Is is a long piece of code, and some of the needed functions are not avaiable in the Win32 API library. Therefore it will take at least a hour or two to implement this in plain VO using Windows API (define functions, structures, write and test the code).
In X# this is a one-liner:
So the fastest solution was to add it to a COM library and use it in VO through COM. Time needed: 10 minutes.
Wolfgang
today I had to add functionality to read a files owner in one of my VO applications.
I have found the following C code:
https://docs.microsoft.com/en-us/window ... ect-in-c--
Is is a long piece of code, and some of the needed functions are not avaiable in the Win32 API library. Therefore it will take at least a hour or two to implement this in plain VO using Windows API (define functions, structures, write and test the code).
In X# this is a one-liner:
Code: Select all
cOwnerName := System.IO.File.GetAccessControl( cFileName ):GetOwner( typeof( System.Security.Principal.NTAccount ) ):ToString()
Wolfgang