Thread: Creating Share

  1. #1
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446

    Creating Share

    Does anyone know the API for creating a share on windows? I looked at the file handling API's and I didn't see anything relevent, although I saw a CreateSymbolicLink API that will be available in Longhorn/Vista for unix compatibility.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    By "share", do you mean making a folder available to other computers on the network? If so, have a look at NetShareAdd. I would be very cautious about programmatically making a share.

  3. #3
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Yes, that is the function I eventually came across. Out of curiosity, what do you think the problem will be with making a share (i.e. sharing a folder on the network) programatically?
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  4. #4
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Er, the obvious security risk problem, maybe?

    What if I decided to share your hard drive(s) with the internet without telling you?

    Although that said, there's more than enough pr0n around already...

  5. #5
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    That's interesting, but I wouldn't be sharing the C: drive. Let's say it's some folder "C:\Program Files\SomeCompany\SomeProduct\", and only read access is given. Is that really such a big deal?
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help creating multiple text files
    By Tom Bombadil in forum C Programming
    Replies: 19
    Last Post: 03-28-2009, 11:21 AM
  2. Error in creating socket in a client (UDP)
    By ferenczi in forum Networking/Device Communication
    Replies: 2
    Last Post: 11-27-2008, 11:11 AM
  3. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  4. C++ Share Interface Problem
    By Morphios in forum C++ Programming
    Replies: 0
    Last Post: 04-28-2003, 07:30 PM
  5. Creating a Simple DLL in C
    By Ultima4701 in forum C Programming
    Replies: 2
    Last Post: 11-23-2002, 01:01 PM