<p>I'm working on a DCOM application with the server and client on two machines, both of which are running WinXP with Service Pack 2. On both machines, I'm logged in with the same username and password.</p>

<p>When the client on one machine calls CoCreateInstanceEx, asking the other machine to start up the server application, it returns E_ACCESSDENIED.</p>

<p>I tried going into the server app's component properties in dcomcnfg and giving full permisions to everyone for everything, but that didn't help.</p>

<p>What do I need to do to allow this call to succeed?</p>

<p><strong>Update:</strong> When the server app is running on a Windows 2000 box, I do not get this error; CoCreateInstanceEx returns S_OK.</p>

Three things to check:
1) Go back to dcomcnfg and make try making sure that not just the access security but also the "launch permissions" section contains the appropriate security users or groups.
2) Ensure that the Authentication Level is set to something else other than "None"
3) Also check that the location on disk that the component is located is actually accessible to the account configured in the security permissions you set.
EDIT:
One more: Are you calling CoInitialiseSecurity() first too? That rings a bell!
EDIT2:
Based on your update: Try dropping the firewalls completely on both XP machines and see if that makes a difference. You may need to let DCOM through explicitly.