November 4th, 2003, 03:19 PM
Make a folder Network accessible with C or C++
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
November 4th, 2003, 05:21 PM
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++.
November 4th, 2003, 06:00 PM
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
November 4th, 2003, 06:12 PM
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
November 4th, 2003, 10:40 PM
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.
November 4th, 2003, 10:45 PM
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++.
November 4th, 2003, 10:51 PM
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.
November 5th, 2003, 12:27 AM
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.
November 5th, 2003, 09:55 AM
Experience is something you don't get until just after you need it.
November 5th, 2003, 11:04 AM
SirDice thanks for the link thats exactly what I was looking for cheers