Hi Jakl,

The whole ADSI topic is pretty confusing to me, and the amount of information on the web is scarce! Unless you're using VB that is.

In the end I realised I was using an older type library. I installed the 2003 SDK and then was able to import the necessary files from tsuserex.tlb.

There is also an additional file which you need to include in your project, it is called "tsuserex_i.c". It contains the interface definitions, and is also found in the SDK.

Install the SDK from here...
http://www.microsoft.com/downloads/d...displaylang=en

To actually get the tsuserex include files you must import the type library into your C++ project. This is done through the classwizrd in VC++ 6.0 and through Class View in VC++ 2003.

Despite this I am still getting errors with my application as the "QueryInterface" line is compiling now but still failing at runtime.

Anyway good luck and let me know how far you get and you might be able to help me out!!