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
Printable View
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
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
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
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
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
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++.
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
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.
:cool:
Dig around MSDN abit. It has sh*tloads of info.
http://msdn.microsoft.com/library/en...etshareadd.asp
SirDice thanks for the link thats exactly what I was looking for cheers
i2c