Make a folder Network accessible with C or C++
Results 1 to 10 of 10

Thread: Make a folder Network accessible with C or C++

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    634

    Make a folder Network accessible with C or C++

    Hiya,

    I was just woundering If any one knew whether It is possible to make an existing folder network accessible with C or C++, Had a look on google but I must not be using the correct terminology.

    this is for all windows systems

    cheers

    i2c

  2. #2
    Senior Member
    Join Date
    Sep 2003
    Posts
    179
    C and C++ are just programming languages, there for can not make a folder in windows shared on the network, as that is a operating system function. However, you could write a program that changes files on the machine to make a certain directory shared on the network. Such as changing registry settings, folder proprties, or some network configuration file. I am unsure how windows controls shared directorys, find this out and then write a program to modify existing files on the computer to fit your needs.

    Example: If windows declares a folder shared via a registry entry, lookup modifying the registry manualy. Also look up modify files in C/C++. Combine the two and WALLA. You have shared a file via C/C++.

    DeafLamb

  3. #3
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    Yep, Im well aware that C and C++ are just languages, seen as ive been coding in themsince the mid 90's

    I was just woundering if there was an Api call or anything

    cheers

    i2c

  4. #4
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    Deaflamb, The operating systems that do this stuff are written in programming languages, so don't give the speech about c and c++ just being programming languages so they can't do anything. I think it would take a great level of skill and you would probably have to have the source code of the operating system. So I would say that you definetly could write some sort of network interface to be used on different computers, you would just have to be highly skilled. How do you think the programs that come with the operating system for networking were written. With a programming language.
    Just my 2 cents

  5. #5
    Senior Member
    Join Date
    Sep 2003
    Posts
    179
    First I did not mean to offend or belittle anyone. Maybe my comments were taken the wrong way. What I ment by C/C++ were just programming languages ment that they arn't designed to be used by any particular operating systems. Meaning that there isn't some built-in function that is part of the basic language to change things that are operating system specific, such as a shared network folder in windows. As far as third party code, such as a specific api or library to do this I am unsure. What I ment was there is nothing in the basic language that could do what you were asking, with out resorting to (parden the term) hacking the actual mechnism that shares the folder, such as the registry entry.

    Sorry if I was mis understood, didn't mean to offend. And by the way I do know that operating systems are written in programming languages.

    DeafLamb

  6. #6
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    You didn't offend me. Maybe I was misunderstood or I misworded my post. I guess it came off with a little attitude which was not meant to be projected. I just think that the built in programs to operating systems were written in some programming language therefore this person could probably do the same thing in c++.

  7. #7
    Senior Member
    Join Date
    Sep 2003
    Posts
    179
    It can definitly be done in C/C++ the problem as you said is uncovering the mechinism by which it is done. Source that is used in the operating system is definitly out of the question as we are dealing with a Microsoft product. If there is a third party library to do this or not, I still believe that it could be done by modifying files associated with sharing folders (registry I assume). This I believe would be the most practicle because no money would need to be spent on purchasing these libraries (unless they are freely available of course). I'll search later and if I come up with anything i'll post.

    DeafLamb

  8. #8
    AO Curmudgeon rcgreen's Avatar
    Join Date
    Nov 2001
    Posts
    2,716
    I think you need to be looking for the winsock api.
    That's where the network interface is in windows. No doubt you can do any kind of networking
    task from C, C++, or any other modern programming language.
    I came in to the world with nothing. I still have most of it.

  9. #9
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    Dig around MSDN abit. It has sh*tloads of info.

    http://msdn.microsoft.com/library/en...etshareadd.asp
    Oliver's Law:
    Experience is something you don't get until just after you need it.

  10. #10
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    SirDice thanks for the link thats exactly what I was looking for cheers

    i2c

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •