Click here to Skip to main content
15,910,980 members
Home / Discussions / COM
   

COM

 
GeneralRe: Problem in registering a COM component. Pin
rajeev8229-Aug-07 16:11
rajeev8229-Aug-07 16:11 
GeneralRe: Problem in registering a COM component. Pin
User 21559730-Aug-07 1:14
User 21559730-Aug-07 1:14 
Question[Message Deleted] Pin
xavierakx28-Aug-07 13:32
xavierakx28-Aug-07 13:32 
AnswerRe: Creating COM object, if there are two COM objects by same name. Pin
xavierakx28-Aug-07 14:27
xavierakx28-Aug-07 14:27 
QuestionIDispatch question Pin
themancer28-Aug-07 4:34
themancer28-Aug-07 4:34 
AnswerRe: IDispatch question Pin
myshketer28-Aug-07 22:28
myshketer28-Aug-07 22:28 
GeneralRe: IDispatch question Pin
themancer30-Aug-07 0:20
themancer30-Aug-07 0:20 
QuestionLDAP binding problem Pin
Manasi D28-Aug-07 1:40
Manasi D28-Aug-07 1:40 
Hi,

I am trying to create a user in WinXP using ADSI.
I am facing problems in executing ADsGetObject.

When I try binding to LDAP using WKGUID, it gives an error.
Part of my code is:
--------------------------------------------------------
hr = ADsGetObject(TEXT("LDAP://10.175.80.24/rootDSE"),
IID_IADs,
(void**)&pRoot);
// Function written above works fine.

if (FAILED(hr)) {
wprintf(L"Bind to rootDSE failed: 0x%x\n", hr);
return hr;
}

hr = pRoot->Get(L"defaultNamingContext",&var);
wcscpy(adsPath,L"LDAP://<wkguid=");
wcscat(adspath,l"aa312825768811d1aded00c04fd8d5cd");
wcscat(adspath,l",");
wcscat(adspath,var.bstrval);
wcscat(adspath,l">");

hr = ADsGetObject(adsPath, IID_IADs, (void**) &pIADs);
// This function written just above is failing: hr is a negative value/
// pIADs comes as NULL

hr = pIADs->Get(L"distinguishedName",&var);
//At this point application crashes obviously as pIADs is NULL.

-------------------------------------------------

The 'adspath' gives the correct path as :"LDAP://<wkguid=aa312825768811d1aded00c04fd8d5cd,dc=patni,dc=com>"
I used ADsGetLastError to check the return code. But return code is success (i.e. zero)

Im unable to understand where am I going wrong.
Can anyone please help me resolving this problem?

Thanks,
Manasi
Questionbooks Pin
nicetohaveyou27-Aug-07 22:58
nicetohaveyou27-Aug-07 22:58 
Questionsoftware for internet cafe Pin
sonalisp827-Aug-07 21:14
sonalisp827-Aug-07 21:14 
Questionno .h file Pin
nicetohaveyou27-Aug-07 21:04
nicetohaveyou27-Aug-07 21:04 
AnswerRe: no .h file Pin
User 21559727-Aug-07 23:18
User 21559727-Aug-07 23:18 
Questionhow to access remote class library by local webservice in .net Pin
atultrip27-Aug-07 3:24
atultrip27-Aug-07 3:24 
Questionhow to know the no. of clients connected to a component? Pin
Nandu_77b27-Aug-07 0:02
Nandu_77b27-Aug-07 0:02 
AnswerRe: how to know the no. of clients connected to a component? Pin
rmp779927-Aug-07 0:20
rmp779927-Aug-07 0:20 
GeneralRe: how to know the no. of clients connected to a component? Pin
Nandu_77b27-Aug-07 2:44
Nandu_77b27-Aug-07 2:44 
AnswerRe: how to know the no. of clients connected to a component? Pin
rmp779927-Aug-07 3:37
rmp779927-Aug-07 3:37 
GeneralRe: how to know the no. of clients connected to a component? Pin
Nandu_77b28-Aug-07 2:11
Nandu_77b28-Aug-07 2:11 
QuestionUrgent Help!! System.Security.SecurityExecption ( C#) -- PLZ HELP ME Pin
fireline108226-Aug-07 21:24
fireline108226-Aug-07 21:24 
QuestionUsing QueryInterface inside a COM Pin
donguy7625-Aug-07 5:55
donguy7625-Aug-07 5:55 
QuestionWhy use a class factory? Pin
sawerr24-Aug-07 23:43
sawerr24-Aug-07 23:43 
QuestionRegarding 'put_Picture' property of IADsUser Pin
Manasi D24-Aug-07 3:51
Manasi D24-Aug-07 3:51 
Questionsimple com+ applications using c# error Pin
salmonraju23-Aug-07 20:59
salmonraju23-Aug-07 20:59 
QuestionSystem context menu Pin
__DanC__22-Aug-07 6:04
__DanC__22-Aug-07 6:04 
Questionhow to Aggregate the ActiveX control frm ATL component Pin
ss43121-Aug-07 23:46
ss43121-Aug-07 23:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.