473,378 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Connect remote windows machine

Hi,
I am a IT student, present we r doing project in network
programming.
I got some problem here...can anybody give me a solution ..?

My problem is:
I have to write a program in C, it takes input a windows machine
name in a LAN and generate a output that list the all folders which r
in sharing in a given machine name.

I need a process or method, how to do it..?

cheers
kiran
Nov 13 '05 #1
3 3110

krian <ve*********@yahoo.com> wrote in message
news:2b**************************@posting.google.c om...
Hi,
I am a IT student, present we r doing project in network
programming.
I got some problem here...can anybody give me a solution ..?

My problem is:
I have to write a program in C, it takes input a windows machine
name in a LAN and generate a output that list the all folders which r
in sharing in a given machine name.

I need a process or method, how to do it..?


You haven't asked anything about the C language, thus your
query is not topical here. You're asking how to using
networking in Windows. The C language has no support for
networking or operating system specific features.
C is a platform-independent language.

Your issue is documented at www.msdn.microsoft.com
If you're still stuck, visit newsgroup:
microsoft.public.win32.programmer

Read the messages there before you post, it's very likely
your question has already been asked and answered there.

-Mike

Nov 13 '05 #2
On Tue, 05 Aug 2003 02:34:05 -0400, krian wrote:
My problem is:
I have to write a program in C, it takes input a windows machine
name in a LAN and generate a output that list the all folders which r
in sharing in a given machine name.

I need a process or method, how to do it..?


That's no problem. Just encode the NetBIOS header (easy, only 4 bytes),
then encode the SMB header (harder, 32 bytes), write that to a socket,
repeat the process for SMB_COM_NEGOTIATE, SMB_COM_SESSION_SETUP_ANDX,
SMB_COM_TREE_CONNECT_ANDX, then open a TransactNamedPipe to IPC$, then
encode and issue the SMB_COM_TRANSACTION for the DCE/RPC bind request
(UUID 4b323fc8-1233-34r3-2393-asdfasdf00), read the bind ack (note you
need full multi-part transactions for this because RPC PDUs can span
multiple SMB buffers), and finally issue the SVRSVC NetShareEnum RPC. Now
do everything in reverse to read the response.

Good luck,
Mike
Nov 13 '05 #3
On Tue, 05 Aug 2003 12:20:22 -0400, Mike Wahler wrote:
encode and issue the SMB_COM_TRANSACTION for the DCE/RPC bind request
(UUID 4b323fc8-1233-34r3-2393-asdfasdf00), read the bind ack (note you
need full multi-part transactions for this because RPC PDUs can span
multiple SMB buffers), and finally issue the SVRSVC NetShareEnum RPC.
Now do everything in reverse to read the response.


This is the problem with replying to off-topic questions. The Windows
API offers a much simpler solution.


I think you should spend some time on rec.humor Mike.
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steven | last post by:
Hi All, I've installed MySQL 4.1.12 on my server, I can connect from the local machine with navicat, but not from a remote machine. I checked with 'nedstat' and there is something listening on...
3
by: Fabian Knopf | last post by:
Hi friends, i have a unix machine PC1 where a database is running ( IBM DB2 V8.1 ) . Then i have another machine PC2 i installed there also ( IBM DB2 V8.1 ). On PC2 i installed unixODBC. To...
5
by: mayamorning123 | last post by:
A comparison among six VSS remote tools including SourceOffSite , SourceAnyWhere, VSS Connect, SourceXT, VSS Remoting, VSS.NET To view the full article, please visit...
8
by: Julia | last post by:
Hi, My client uses a remote object when I host the remote object inside a windows application all seem to work fine but when I host the same object inside a windows service I get the following...
3
by: asemeiks | last post by:
I'm using Access 97, Jet 4.0. the data resides on a Win 2000 domain server. Using .Net 1.1 and IIS 5.0 on a local XPPro computer I am trying connect to a Jet database on the server. If the data...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
13
by: josh | last post by:
I'm pretty new to both sql 2005 and VB but please bear with me. I have installed SQL 2005 express on a Windows 2003 Standard server. I have also installed VB 2005 Express edition on the server. SQL...
0
by: tamayi | last post by:
I have a problem (like most others posting issues on this forum :) ) I have a remote server running Windows XP SP2, with both SQL Server 2005 Express with Advanced Features and SQL 2000...
5
by: Alan Silver | last post by:
Hello, Server configuration: Windows 2003 Server SP2 SQL Server 2000 SP4 ..NET v2.0.50727 just built up a new server using the same configuration as my current one. I even used the same CDs...
1
by: ganeshp | last post by:
Hi All, One programming technique to connect from one system to other is through socket programming. Socket programming can be done using programming languages like Java,C,C++. Are there any...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.