Last week I came across a very strange problem with Windows printing - an attempt to create a printer device context through CreateDC within a 32-bit IIS worker process would fail and return NULL, but GetLastError would indicate that there was no error and there was nothing in the system or application event log to help me identify the problem.
Naturally, my first thought was that the IIS anonymous user is missing some access rights and I spent some time double-checking various permissions and privileges, but found nothing that would be relevant in this case. Suspecting that the problem lies elsewhere, I added the anonymous user to the Administrators group, which actually made things worse. Now not only CreateDC would still return NULL, but it would actually take about a minute for this call to fail!