Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API to hook up to NT?

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
Are there APIs to hook up to an NT server from another platform? We would like to work with the filesystem itself to work with the files. Is this possible. Mike Wills
AS400 Programmer
 
If what you are trying to do is to be able to view
shared resources then I would wrap up some win32 c++ code
in jni wrapper functions. The c++ class to look at
is win32_share.
This if you are speaking of a "file server".

I'm unsure when you say nt server what kind of server
you are speaking of. If it's a web server then you
should be able to get at anything viewable through
a URLConnection and dump it locally. The catch
would be to write to the server. This would require
a servlet or cgi script to live on the server. Still this
is pretty easy to do. Alternately you could just write
a simple server to run on some port that will read/write
the files and file info you request. ( security! )
A server like this is pretty easy to do.
 
What I am thinking of is a file share that only a select few can access though Network Neighborhood on the NT server. One user would be for this Java servlet that we would be creating. We don't want to have to maintain two sets of users because the front end of this is a web application that already does this. So I thought, if we can connect via one user and keep our security going through the one software package, that would be cool. BTW, this software runs on an AS400.

Do you have any references for writing a server like you are talking about? Mike Wills
AS400 Programmer
 
What I mean by a server is a simple server to run on
the nt machine and accept requests from the client
for listing files or getting files or putting files.
This would be a very simple type of generic server.
It would open a huge security hole if proper precautions
aren't taken to either do password verification (which
if you are worried about a man in the middle attack
is a joke) or encryption / decryption (which would be
very strong and as long as you are not dealing with
huge amount of data realtively fast)

This would not give you any type of "network neighbood"
access but if one were interested enough at working
on the client side they could implement an "explorer"
type of interface. Of course you couldn't run exe's
through this thing.

Basically what you would have is an ftp client that
uses a simple api that you dream up. This is just
old school socket programming.

I can give you some code to get started if you like.
It's very simple stuff really.
 
Oh yeah of course the server could run on the
as 400 and client on nt.
( I don't know much about the as 400 platform
but it's java so you should be ok. Right?)
 
Actually it would be the other way around, but anyway. Some code would be nice. I have never done any programming like that before. You can email it to programmer@koldark.net. Mike Wills
AS400 Programmer
 
Will do.
I'm at work now so I can't till I get home.
I'll shoot some simple code to get you started
in the pm.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top