I'm writing a program that is only meant to be run by a domain administrator on NT. I need my program to be able to find out if the current user is logged in as a domain admin, but can't make it work.

Can anyone help?

I've been using AllocateAndInitializeSid then comparing the SID with all group SIDs but it doesn't work. I think I'm close, but maybe using the wrong RID.