Santomania

Addy Santo's occasional braindumps

January, 2006

  • Santomania

    Code Snippet: Working with Permissions (ACLs/ACEs) in C# under .Net 1.1

    • 3 Comments
    I've been working lately on adding "self-healing" capabilities to a certain application. The idea is to create a set of utility functions which will validate (and fix if needed) various environmental settings such as NTFS permissions, registry permissions...
  • Santomania

    Code Snippet: Setting NTFS permissions

    • 2 Comments
    My previous post shows how to use Windows32.Security to read and set permissions to the registry. Doing the same for a NTFS is even simpler: public bool TestNTFSPermissions( string path, string userName) { SecurityDescriptor secDesc = SecurityDescriptor...
  • Santomania

    GDI + LINQ = Generate a bar graph in a single line of code

    • 3 Comments
    This is a simplified version of actual code from an app I'm working on. There are a few lines of setup, and then the cool part (the last statement): Using a select statement to iterate over a List < double > , creating a RectangleF object for each...
Page 1 of 1 (3 items)