Can anyone help with me this problem, or at least point me in the right
direction as to where to post it?
------------------------------------------------------------------------
I am trying to create a user object in NDS using VB 6.0. When I get to
the NWDSAddObject function, it returns a code, "-604" which I believe
correlates to a "No such class" error.
The code is below, I would really appreciate any help.
Thanks
Brendan
retCode = NWDSCreateContextHandle(context)
anyName = DS_ROOT_NAME + Chr(0)
Call StringToByteArray(anyName, byteName)
retCode = NWDSSetContext(context, DCK_NAME_CONTEXT, VarPtr(byteName
(0)))
anyName = Text1.Text + Chr(0)
Call StringToByteArray(anyName, byteName)
retCode = NWDSSetContext(context, DCK_TREE_NAME, VarPtr(byteName(0)))
retCode = NWDSAllocBuf(DEFAULT_MESSAGE_LEN, inBuf)
retCode = NWDSInitBuf(context, DSV_ADD_ENTRY, inBuf)
retCode = NWDSPutAttrName(context, inBuf, "Object Class")
retCode = NWDSPutAttrVal(context, inBuf, SYN_CLASS_NAME, "User")
retCode = NWDSPutAttrName(context, inBuf, "Surname")
retCode = NWDSPutAttrVal(context, inBuf, SYN_CI_STRING,
"WatkinsTest")
retCode = NWDSPutAttrName(context, inBuf, "Given Name")
retCode = NWDSPutAttrVal(context, inBuf, SYN_CI_STRING, "Brendan")
retCode = NWDSAddObject(context, "bwatki02.imss.mtsinai.north.uoc", -
1,
0, inBuf)
MsgBox retCode
- Anders Gustafsson, Engineer, CNE6, ASE
NSC Volunteer Sysop (http://support-forums.novell.com)
Pedago, The Aaland Islands (N60 E20)
Using VA 4.52 build 277 (32-bit) on Windows 2000 build 2195
> retCode = NWDSAddObject(context, "bwatki02.imss.mtsinai.north.uoc", -
> 1,
> 0, inBuf)
>
Two things:
a) Why use "1" here and not a 32-bit integer variable init. to -1?
b) Depending on your context, the "bwatki02.imss.mtsinai.north.uoc" may need to be ".bwatki02.imss.mtsinai.north.uoc" instead
For more info, please post to http://developer-forums.novell.com
Peter
Novell Product Support Forum
'NDS Rules!'
Thank you very much for getting back to me. I have posted to
developer forum.
I had used -1 and not 1, and I tried to use your second suggestion,
but it didn't help.
I'll await a response from novell.devsup.general.
Thanks again and thanks Anders!
Brendan
Peter Kuo <Pe...@Novell.Support.Connection> wrote in message news:<VA.00000350.37893d28@aopen3ghza>...
Your message was not posted to the official Novell news
server. While your news server might show the Novell support
newsgroups, Novell has no official connection with other news
servers, and the message you posted will probably never
propagate to the official Novell server. The SysOps only see
messages on the Novell server and for that reason,
you will probably never get a reply to your
message posted here.
I suggest you post your message directly to the official
novell news server named support-forums.novell.com. The
Novell news server is freely accessible both through HTTP
and NNTP. See http://support.novell.com/forums for details.
This message was posted automatically. Please do not reply
to it.
Marcel Cox
Novell Support Forums SysOp
http://forge.novell.com/modules/xfmod/project/?vb6-api-class
So, I am now able to create user accounts etc.
Marcel Cox <cim...@digitalme.com> wrote in message news:<4021398c$1...@news.vo.lu>...