Loading ...
Sorry, an error occurred while loading the content.

Re: Patch for ADVAPI Problems (ACL's under Windows)

Expand Messages
  • Craig Barkhouse
    ... I m not following this thread closely, and I did not read through this patch closely. The above did catch my eye, however. There are more platforms than
    Message 1 of 3 , Sep 5, 2000
    • 0 Attachment
      > + /* This only works on Windows NT and 2000. */
      > + if (g_PlatformId == VER_PLATFORM_WIN32_WINDOWS)
      > + return NULL;

      I'm not following this thread closely, and I did not read through this patch closely. The above did catch my eye, however. There are more platforms than just WIN32_WINDOWS and WIN32_NT. Specifically, there is also WIN32s. If you want to make sure you're on an NT platform, you should test for precisely that, i.e.

      /* This only works on Windows NT/2000. */
      if (g_PlatformId != VER_PLATFORM_WIN32_NT)
      return NULL;
    • maurice s. barnum
      ... two suggestions: 1) include WINAPI in your function pointer typedefs. that way you won t care whether the default calling convention is __stdcall. typedef
      Message 2 of 3 , Sep 5, 2000
      • 0 Attachment
        Brent Fulgham <brent.fulgham@...> writes:

        : Hello fellow VIM'rs:
        :
        : Attached is a patch that seems to fix the ADVAPI32.DLL problem
        : I (and others) have had when running under Windows 95. This
        : should work under NT, but I'd like someone to try it out.

        two suggestions:

        1) include WINAPI in your function pointer typedefs. that way you
        won't care whether the default calling convention is __stdcall.

        typedef DWORD WINAPI (*PSNSECINFO) (LPTSTR, enum SE_OBJECT_TYPE,
        SECURITY_INFORMATION, PSECURITY_DESCRIPTOR*);

        etc.

        2) don't bother checking for the windows flavor, just call
        LoadLibrary() and GetProcAddress(). that way if MS adds these to some
        future win9x (ME?), things will "just work". the only wrinkle then is
        telling the difference between uninitialized and invalid function
        pointers. i'd probably go with the boring: having a flag variable in
        one of three states:

        not initialized
        acl api available
        acl api not available

        my apologies for not supplying a patch to your patch: i don't have
        windows handy to test it tonight.

        --xmsb
      Your message has been successfully submitted and would be delivered to recipients shortly.