All named objects, which includes the desktop you create, have a security descriptor. A security descriptor describes the owner and group SIDs (security identifiers) for each object, along with its ACLs (access control lists). The function that creates the object uses it to control who has what access to the object.
The CreateDesktop() function has an optional parameter which is a pointer to a SECURITY_ATTRIBUTES object. The SECURITY_ATTRIBUTES object has a member lpSecurityDescriptor, which is a pointer to a SECURITY_DESCRIPTOR structure. There are numerous functions you can call on the SECURITY_DESCRIPTOR to set the ACLs.