Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    vb6 - globally change VBPs (VB6)

    I've discovered part of my problem: The developer's source code, as loaded from CD, contains references to Windows NT, whereas I'm running Win98SE.


    Reference=*G{00020430-0000-0000-C000-000000000046}#2.0#0#C:WINNTSystem32stdole2.tlb#OLE Automation


    Reproduced above is a line from a typical *.VBP file.


    I could use DOS utilities - SWEEP CHANGE.COM - to change all occurrences of C:WINNT to c:windows, but I'm feeling insecure enough to think that this might cause hiccoughs somewhere.

    Is there an approved way to make this change at a higher level in Visual Studio?

    What do other people do when they port the source to another system (such as taking it home for the weekend) and finding that all the references have changed?


    (signed) "Puzzled" of Toronto.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: vb6 - globally change VBPs (VB6)

    He *hard-coded* a path in the application? Why would he do that? Is the code actually setting the references to the automation type library? You can't ever be sure the folder names will be the same on any machine. WinNT is the default Windows name for NT and later OS versions, but that can be changed.
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: vb6 - globally change VBPs (VB6)

    Chris,

    That line comes from "Tools, References" in VB. If you change the reference in VB, you'll see the code changed when you view the VBP again.

    Normally you wouldn't just port the code raw- you would distribute an application with a package (using package and deployment wizard)- so you would probably (possibly?) avoid this problem. Especially if you created your distribution files on the same operating system as your customers. Obviously though you are in a different situation.

    I'd change the reference from VB, and then replace of the entire line from the old VBP with the entire line of the new VBP in all VBP files. After backing up everyting of course.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: vb6 - globally change VBPs (VB6)

    >Normally you wouldn't just port the code raw-

    Voila! as they say in London. You are right about the Tools reference. The "c:winnt" is sprinkled throughout, which tells me that unless I start using a distribution package thingo before Thursday 7am, I'm going to have a similar problem when I get back to the client site. Thanks for the heads-up on THIS one.

    These sorts of problems are typical when one is given some orphaned code and told to "get it working". At least none of the files is password-encrypted (so far!).


    I have decided to plod my way through them, one by one. Some modules won't compile until another module is compiled, so I have built a stack in my head, and am pushing and popping like crazy; as i discover more of the utility projects, the number of failed DLLs drops; that is, i am more likely to have a successful compiuile straight off.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: vb6 - globally change VBPs (VB6)

    >He *hard-coded* a path in the application? Why would he do that?

    As Geoff has determined, I'm not very good, yet, at stating what's going on. The "c:winnt" stuff is/was in the references. I'm cleaning them up manually as I go by use of the Project, References window.

    I have been known to hard-code stuff from time to time. The trick is to do it only in files that will be stored in the c:temp directory.
    Part of this project will be to skim out any hard-coded constant data and bring it to a declarations/environment section. On the whole the code is easy to read (neat, white space etc.), but I've not had any time to actually read it yet. As you will see from my signature, I'm being taken away on holiday. If I can work out how to dump the source code to lasre printer, double-sided, before Friday noon, it could turn into the best vacation of my life ........

    >Is the code actually setting the references to the automation type library?

    Could be. Since the answer to my "Automation" question was not a straight-forward "Set the Options" type of response, there is quite possibly something in his source code, or else in the way I set up VisStudio, that is causing this thing to take wing (it flutters across the screen). I'll be keeping my eyes peeled for the next mention of it. One of life's little mysteries.

Posting Permissions

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