Susan & Gyorgy,
Thanks for your reply !!
This fix seems to be working. I am now
opening connection (NWDSOpenConnToNDSServer )
authenticating connection (NWDSAuthenticateConn )
before parsing the path (NWParseNetWarePath)
ccode =
NWDSOpenConnToNDSServer(context,(char*)homeserver,&conn1
);
if(ccode)
{ Error("Error occuered while opening connection with
server %S :
0x%04X",homeserver,ccode);
}
else
Print("Successfully opened connection with server %S
",homeserver);
ccode = NWDSAuthenticateConn(context,conn1);
if(ccode)
{
Error("Error occuered while authenticating connection
with
server %S : 0x%04X",homeserver,ccode);
}
else
Print("Successfully authenticated connection with
server %S ",homeserver);
ccode = NWParseNetWarePath(path, &conn, &dirHandle,
ppath);
if (ccode)
Error("error in parsing the path %s :
%04X",path,ccode);
As you observed , I am not using connection handle returend
by
NWDSOpenConnToNDSServer in parsing. Any way for
NWParseNetWarePath the
connection handle is output parameter.
This makes me think that , I just have to open and
authenticate a
connection and it will be available for my code.
Thanks for all your support !!
Sanjay
> As Susan wrote, these steps only grant you file system
access on the
primary server. For other servers you have to call
> NWDSOpenConnToNDSServer followed by
NWDSAuthenticateConn with the
correct server name.
>
> Don't forget that the Novell client does a lot of
complex things in the
background, especially at login time. Never
> assume that a simple NWDSLogin + NWDSAuthenticateConn
sequence performs
the same in your code
>
> Thanks,
> Gyorgy
>
> sanjayS sottjo.com wrote:
> >>Hi
> >>
> >>The connections you see from the client when
you right click the N and
> >
> > look
> >
> >>at connections, are not available to windows
service.
> >>
> >>You might try using NWCCOpenConnByName and
NWDSAuthenticateConn (after
> >>login) because the api is scanning connections
to determine what's
> >>available.
> >>
> >>Thank you
> >>Susan
> >>
> >>
> >
> >
> > Susan,
> > Yes, thats very true.
> >
> > Any connection made by the Novell client are not
available to my
> > processing running as winodws service.
> >
> > But I do all the login/authenticate sequence in my
application.
> > I do following steps to connect to my primary
server (having all users)
> >
> > NWCallsInit
> > NWInitUnicodeTables
> > NWDSCreateContextHandle
> > NWDSSetContext ........
> > NWDSLogin
> > NWDSOpenConnToNDSServer
> > NWDSAuthenticateConn
> >
> >
> > ANd this goes fine as I am able to add a user
delete the user . But
the
> > trouble starts when deleting users directory which
is on some other
server
> > volume. The NWParseNetwarePath function gives me
the error 0x8866. The
> > input path is in format
<Server_name>\<Physical_vol>:<dir_path> .
> >
> > One more observation the server mentioned in above
path is different
than
> > primary server and doesnt get attached when I
login through the Novell
> > client. (means it doesnt show up in the Novell
connection list)
> >
> > Does this mean my process when running as windows
service and login to
my
> > primary server doesnt have access to the other
server holding the home
> > directory.
> >
> > How can I get over this ?? The second server is
supposed to get
attached
> > when logged to primary server , but its not
happening. ??
> >
> > Please help !!
> >
> >
> >
> >
|