Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem loading non-default wab

Problem loading non-default wab

Scheduled Pinned Locked Moved C / C++ / MFC
help
14 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Member 868926

    Good point, well I'm now trying: wp.szFileName = "C:\\Jim.wab"; as I know that wab exists there but it still isn't loading it. G

    C Offline
    C Offline
    Code o mat
    wrote on last edited by
    #5

    Are you completely sure that is a correct WAB file and it is readable by the process (it has the required access rights and somesuch)?

    > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

    M 1 Reply Last reply
    0
    • L Lost User
      1. Have you checked the actual error code returned from the WABOpen Function?
      2. Have you checked the documentation[^] for compatibility?

      One of these days I'm going to think of a really clever signature.

      M Offline
      M Offline
      Member 868926
      wrote on last edited by
      #6

      It doesn't return an error, just loads my Vista Contacts instead. Compatability seems OK.

      L 1 Reply Last reply
      0
      • C Code o mat

        Are you completely sure that is a correct WAB file and it is readable by the process (it has the required access rights and somesuch)?

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

        M Offline
        M Offline
        Member 868926
        wrote on last edited by
        #7

        Yes the wab is OK. If you doubleclick it Windows asks if you want to import the addresses. Somehow the WabOpen bit just thinks I want the default Wab (although there isn't one in Vista) and isn't getting the filename. In the original code there was a 'GetNativePath()' call which isn't available - could it be to do with how I'm passing in the file location string? G

        C 2 Replies Last reply
        0
        • M Member 868926

          Yes the wab is OK. If you doubleclick it Windows asks if you want to import the addresses. Somehow the WabOpen bit just thinks I want the default Wab (although there isn't one in Vista) and isn't getting the filename. In the original code there was a 'GetNativePath()' call which isn't available - could it be to do with how I'm passing in the file location string? G

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #8

          As far as i remember the documentation says it will load the default if you pass NULL for the path, but you are not passing NULL but a seemingly correct path. Hmm...

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

          1 Reply Last reply
          0
          • M Member 868926

            Yes the wab is OK. If you doubleclick it Windows asks if you want to import the addresses. Somehow the WabOpen bit just thinks I want the default Wab (although there isn't one in Vista) and isn't getting the filename. In the original code there was a 'GetNativePath()' call which isn't available - could it be to do with how I'm passing in the file location string? G

            C Offline
            C Offline
            Code o mat
            wrote on last edited by
            #9

            If i check the documentation (http://msdn.microsoft.com/en-us/library/ms629458%28v=vs.85%29.aspx[^]) for WAB_PARAM, the szFileName member is declared to be LPTSTR. This suggests that depending on your target options, it might be a unicode or an ansii/mbcs string which then suggests that there might be a unicode and an ansii/mbcs version of the function (as with a lot of API methods throughout windows). When you query the function's pointer...are you sure you are getting the correct version?

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

            M 1 Reply Last reply
            0
            • M Member 868926

              It doesn't return an error, just loads my Vista Contacts instead. Compatability seems OK.

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #10

              Have you tried removing the default contacts file to see if it works then? It's a long while since I used WAB and I never actually tried using the non-default file.

              One of these days I'm going to think of a really clever signature.

              M 1 Reply Last reply
              0
              • L Lost User

                Have you tried removing the default contacts file to see if it works then? It's a long while since I used WAB and I never actually tried using the non-default file.

                One of these days I'm going to think of a really clever signature.

                M Offline
                M Offline
                Member 868926
                wrote on last edited by
                #11

                I tried that, then it just doesn't load anything.

                L 1 Reply Last reply
                0
                • C Code o mat

                  If i check the documentation (http://msdn.microsoft.com/en-us/library/ms629458%28v=vs.85%29.aspx[^]) for WAB_PARAM, the szFileName member is declared to be LPTSTR. This suggests that depending on your target options, it might be a unicode or an ansii/mbcs string which then suggests that there might be a unicode and an ansii/mbcs version of the function (as with a lot of API methods throughout windows). When you query the function's pointer...are you sure you are getting the correct version?

                  > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

                  M Offline
                  M Offline
                  Member 868926
                  wrote on last edited by
                  #12

                  I'm not sure - in the header file I can't see another version except WabOpenEx which I tried but didn't work. I've noticed that my Contacts folder is actually receiving the wab addresses and getting bigger and bigger! So instead of opening the wab on its own it's adding them to the Contacts then opening those instead. Is this some undocumented Vista mechanism? Thanks very much for everyone's conttributions so far. G

                  C 1 Reply Last reply
                  0
                  • M Member 868926

                    I tried that, then it just doesn't load anything.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #13

                    Sorry, I cannot think of anything else to suggest. You could try the Microsoft forums.

                    One of these days I'm going to think of a really clever signature.

                    1 Reply Last reply
                    0
                    • M Member 868926

                      I'm not sure - in the header file I can't see another version except WabOpenEx which I tried but didn't work. I've noticed that my Contacts folder is actually receiving the wab addresses and getting bigger and bigger! So instead of opening the wab on its own it's adding them to the Contacts then opening those instead. Is this some undocumented Vista mechanism? Thanks very much for everyone's conttributions so far. G

                      C Offline
                      C Offline
                      Code o mat
                      wrote on last edited by
                      #14

                      Frankly, i don't know, sorry... :(

                      > The problem with computers is that they do what you tell them to do and not what you want them to do. < > If it doesn't matter, it's antimatter.<

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups