Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB Pointers!?!

Options
  • 07-11-2005 8:27pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    Does anyone know can pointers in vb used or is it possible to say select the directory of a location and get its pointer value and then temperaoly point that folder to a different folder by using pointers?
    Like i want to get the windows referance for a folder and point it to another folder so as an application can use it!

    I found this example but its only really using entered variables!

    www.codeproject.com/vbscript/how_to_do_pointers_in_visual_basic.asp


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    What exactly are you trying to do? I'm quite sure it can be achieve without using the API.

    However if you're going to get into API programming Dan Appleman's book is a good read :)


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    I have an application that can only access folder 'A', folder 'B' and 'C' need to be available to the application, i want to write a little app so i can say get the referance variable from 'A' and point to 'B' temperoly or 'C'!


  • Registered Users Posts: 199 ✭✭DecTenToo


    Can you describe why you need to do that - rather than what you need to code. Might be an easier way to do it if you break the problem down into a business requirement. What's the reasoning for the multiple folder acess?


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Ziycon wrote:
    I have an application that can only access folder 'A', folder 'B' and 'C' need to be available to the application,

    Sorry, but this doesn't make sense.

    You only want A to be available, but want B and C to be available as well?
    Or you only want A, B and C to be available?

    i want to write a little app so i can say get the referance variable from 'A' and point to 'B' temperoly or 'C'!

    And why do you need pointers, other than because you've used the word "point" in that sentence?

    Nothing you've described so far requires pointers.
    Like i want to get the windows referance for a folder and point it to another folder so as an application can use it

    1) What do you mean by "the windows reference" for a folder?

    2) What do you mean "point it at another folder"? Why not just get the reference for that other folder in the first place?

    jc


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    1) I have a application that records to a folder that it creates on the D:\ called 'Localmac', this is the folder that the application will play back what ever it has recorded!

    2) Next i have a a server program running on the same system that saves folders that are monitored on other systems on the network and it saves a copy of these folders to the D:\ in its own folder! So i could have three systems being monitored, A, B, C!

    3) I want the application on the server to be able to play the backed up information that it got from other systems and created folders for on the D:\ which are called A, B, C!

    4) The problem is that the playback application will only playback from the 'Localmac' folder, also you can not select a location to play back!

    So basicly i need to be able to try and point the contents of A, B or C into the 'Localmac' for the time the application plays back the video!
    I need to be able to switch between loads of backup folders!

    Is that any clearer?


  • Advertisement
  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    Ziycon wrote:
    4) The problem is that the playback application will only playback from the 'Localmac' folder, also you can not select a location to play back!
    If I didn't know better...that sounds like trying to fool DVD software to believe that a DVD copied to a harddisk is still a DVD.
    So basicly i need to be able to try and point the contents of A, B or C into the 'Localmac' for the time the application plays back the video!
    I need to be able to switch between loads of backup folders!

    Is that any clearer?

    Somewhat.

    Pointers have nothing to do with your problem.

    To be honest, I'm not au fait enough with the inner workings of the windows file system, but if you have an application which will only look for information in one place, then I would say you'll find you need to copy the information to that place. Or use shortcuts if this player will fall for them. Or you need to get a better player.

    Why not store these videos somewhere/anywhere else, copy it to this "localmac" directory when you need it there, and then delete it afterwards?


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Apparently, NTFS does have an equivalent of static linking, and early versions of NT came with a litte tool to do it on their developer disks. I don't know how it's done these days tho.


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    You mean symbolic links, and not static links, I assume?



    jc


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    No, I mean hard links, in fact :)


Advertisement