Category: Delphi Developers: I made this!
I wrote a function to make JSON more readable, and naturally I wonder if I missed something crucial so that it eventually will break?
There are probably more efficient ways to work with strings than concatenating character by character, but performance was not a key goal.
I wrote a small AD snippet just the other day, to check which AD groups a specific AD user was member of. I needed to check if a user was member of a specific AD group, to enable or disable some “super user” functions in the system management application.
Note that it uses web.wintypes.adstypes which may only be available in XE5 and upwards?
For example after replacing the .exe file for an upgrade (under Windows).
Uses CustomDebugOut (see other post).
Simple override for Windows.OutputDebugString which adds a timestamp, thread id and memory, and an overloaded string version to get rid of those pesky pChar casts.
The output shows up in the in the BDS Event Log, or it can be captured while running live with Sysinternal’s DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx).