When planning your security implementation, always design using the client/server model! In other words, do not use the security API just anywhere in your Win32 applications; these functions belong only in software that will be run on a server.
Split the project into a client application, which individual users will use, and a server application, which runs on a server and handles all incoming requests for secured objects. Why insist on this extra work? There are several reasons:
WARNING
Always use the client/server model when designing systems that need Windows NT’s security services. The security checking should always (and only!) be performed by an application functioning on a server or in a server capacity. A client application, running on the user’s system, should use any of the standard network communications means to request access to the secured objects from the server application. This technique allows you to combine secure access with the ability to access the objects via workstations that do not internally support NT security—for example, from Windows 98, a Java applet running in a Web browser, or a Unix or Macintosh machine.
So how is the client application supposed to communicate with the server application? There is more than one right answer to this; however, the method you choose must be a secure one. Typically, any of the following means of communicating between client and server applications can be used:
These are not the only means you could use, of course. However, in most cases, any one or a combination of those listed here are excellent choices.