Results 1 to 7 of 7

Thread: quite a challange !

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    166

    quite a challange !

    hello everyone !!

    i've a very typical problem. i've calling a VC++ exe from VB. in VC program i'm writing to a file, which i'm reading in VB. currently i've given fixed path for file in VC. this is a major bug in making VB setup exe.

    how can i pass the filepath from VB to VC ?? i tried command line arguements, but it didn;t work and i was running into major fatal errors as i'm passing other command line arguements as well.


    can anyone pls tell me some way to fix this. to be abl e to pass file path to VC from VB


    thanks

    shruti !!!

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    I think the problem is the recieving end (i.e. VC), since the reciever has to understand whats coming!
    To send command strings just put them after the exe-name when you do the shell command.
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  3. #3
    Fanatic Member JPicasso's Avatar
    Join Date
    Aug 2001
    Location
    Kalamazoo, MI
    Posts
    843
    My exp with C++ and VB, the less you pass between, the better.

    I'd have the VB app write an INI file with the path in it,
    then have the C++ program pick up the info there.

    Its' an oldie but a goodie.

    either an INI file, or just a plain text file in the C++ directory that specifies the location of the drop file.
    Merry Christmas

  4. #4
    Frenzied Member RudyL's Avatar
    Join Date
    Mar 2001
    Location
    Chicago
    Posts
    1,519
    Or you could do like windows and use the registry. I use it all the time..


    It works better than an INI file, more secure I think..

    Rudy

    10 different ways to skin a cat and amazingly enough each and every one has the same result, the cat gets skinned! The same can be applied to code, so be nice and accept each others "preferences".

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    166
    ya, i was also thinking of an ini file or registry.

    but with ini file, how will VC know the path of ini file ?? i was not sure whether it'll pick from the current directory ??

    may be windows registry is more safe. can u pls tell me how to go abt it. how shud i writ path in registry from VB and then access it from VC. i dont know how to go abt it !!


    thanks

    shruti !

  6. #6

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    166
    ya... that worked i've done the registry settings

    thanks !!!!

Posting Permissions

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



Click Here to Expand Forum to Full Width