Click here to Skip to main content
15,884,473 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi,

I wnat to create a new attribute in my domain active directory schema in a MFC project.

There is a C++ sample code in Microsoft's website but I am unable to use it correctly. It returns some exception about stack!

Any help?
Thanks in advance
Posted
Updated 15-Feb-11 6:16am
v2
Comments
Nish Nishant 15-Feb-11 10:30am    
Link to the article you are using, and post some code and show exactly where you are getting the stack error.
mosafermsfmsf 15-Feb-11 12:37pm    
hithank a lot for your attention
sorry it is my first question Wink

this is my sample code article link:

http://msdn.microsoft.com/en-us/library/ms676321(VS.85).aspx[^]

in this line :

hr = spSchemaCont->Create(CComBSTR("attributeSchema"),
sbstrAttribute,
&spDisp);

it shows this message:
the value of esp was not properly saved across a function.....

do you know it?
OriginalGriff 15-Feb-11 10:32am    
That's not really very helpful, you know!
Did it give you any more information than "some exception about stack!!!"? Perhaps an error message? With a file name, and line number?
Perhaps it occurs in a particular function?
If you were to edit your question and include some of that, it might help us to help you...
mosafermsfmsf 16-Feb-11 5:25am    
hithank a lot for your attention
sorry it is my first question Wink

this is my sample code article link:

http://msdn.microsoft.com/en-us/library/ms676321(VS.85).aspx[^]

in this line :

hr = spSchemaCont->Create(CComBSTR("attributeSchema"),
sbstrAttribute,
&spDisp);

it shows this message:
the value of esp was not properly saved across a function.....

do you know it
cariolihome 16-Feb-11 18:23pm    
In code
// Bind to the IADsContainer interface of the schema container.
CComPtr<iadscontainer> spSchemaCont;
hr = ADsOpenObject( L"LDAP://RootDSE",
NULL,
NULL,
ADS_SECURE_AUTHENTICATION,
IID_IADs,
(void**)&spSchemaCont);
replace IID_IADs with IID_IADsContainer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900