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#
  4. Ambiguous

Ambiguous

Scheduled Pinned Locked Moved C#
graphicsgame-devquestionlearning
10 Posts 6 Posters 0 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.
  • D Offline
    D Offline
    ddecoy
    wrote on last edited by
    #1

    I keep getting these errors when working with Directx (directsound) :

    The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' and 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()'

    The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()' and 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()'

    and so on... Get it on xp, vista , visual 2005,2008 ... Have no clue what is causing this errors, as everything compiles and works...

    Learning without thought is labor lost; thought without learning is perilous. (Confucius)

    P realJSOPR 2 Replies Last reply
    0
    • D ddecoy

      I keep getting these errors when working with Directx (directsound) :

      The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' and 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()'

      The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()' and 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()'

      and so on... Get it on xp, vista , visual 2005,2008 ... Have no clue what is causing this errors, as everything compiles and works...

      Learning without thought is labor lost; thought without learning is perilous. (Confucius)

      P Offline
      P Offline
      Paulo Zemek
      wrote on last edited by
      #2

      Considering the classes are the same... aren't your project referencing two versions of the same DLL? For example, when I changed the version of one of my dlls, projects referencing it where compiling, but the project was also referencing another DLL, that referenced an old version of the first dll, and so I get those errors at run-time. Try checking all the references in your project. I am not sure, but that might be the cause. * Also, try checking if you are not copying locally a DLL that is in the GAC. This can also end-up loading two versions of the same DLL, which in memory have different IDs and so, are ambiguous.

      D 1 Reply Last reply
      0
      • P Paulo Zemek

        Considering the classes are the same... aren't your project referencing two versions of the same DLL? For example, when I changed the version of one of my dlls, projects referencing it where compiling, but the project was also referencing another DLL, that referenced an old version of the first dll, and so I get those errors at run-time. Try checking all the references in your project. I am not sure, but that might be the cause. * Also, try checking if you are not copying locally a DLL that is in the GAC. This can also end-up loading two versions of the same DLL, which in memory have different IDs and so, are ambiguous.

        D Offline
        D Offline
        ddecoy
        wrote on last edited by
        #3

        I have just one reference to the Microsoft.DirectX.DirectSound.dll, I set the copylocal to false. If i compile the errors go away, but are there after a few seconds. Where can I look for extra references ? In the project/solution file? app.config ?

        Learning without thought is labor lost; thought without learning is perilous. (Confucius)

        P M 2 Replies Last reply
        0
        • D ddecoy

          I have just one reference to the Microsoft.DirectX.DirectSound.dll, I set the copylocal to false. If i compile the errors go away, but are there after a few seconds. Where can I look for extra references ? In the project/solution file? app.config ?

          Learning without thought is labor lost; thought without learning is perilous. (Confucius)

          P Offline
          P Offline
          Paulo Zemek
          wrote on last edited by
          #4

          To be honest, I don't know. When I had this type of error the cause was the local copy or one of the DLLs I created also referencing the DLL, but at another version. If you don't use DLLs created by you, I really don't know where to look. But your project runs? Or you only get these messages as warnings? Maybe somehing the Visual Studio is referencing the dll again, but your project doesn't.

          D 1 Reply Last reply
          0
          • P Paulo Zemek

            To be honest, I don't know. When I had this type of error the cause was the local copy or one of the DLLs I created also referencing the DLL, but at another version. If you don't use DLLs created by you, I really don't know where to look. But your project runs? Or you only get these messages as warnings? Maybe somehing the Visual Studio is referencing the dll again, but your project doesn't.

            D Offline
            D Offline
            ddecoy
            wrote on last edited by
            #5

            It will be something like that, but have no clue where these faulty references are. It ain't warnings but real errors,and when I compile they disappear but are shortly after there again. Anyway it's not a blocking factor but rather anoying. Thanks for your time!

            Learning without thought is labor lost; thought without learning is perilous. (Confucius)

            1 Reply Last reply
            0
            • D ddecoy

              I keep getting these errors when working with Directx (directsound) :

              The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' and 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()'

              The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()' and 'Microsoft.DirectX.DirectSound.BufferPositionNotify.BufferPositionNotify()'

              and so on... Get it on xp, vista , visual 2005,2008 ... Have no clue what is causing this errors, as everything compiles and works...

              Learning without thought is labor lost; thought without learning is perilous. (Confucius)

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #6

              Right-click on the offending variable, select "Resolve", and then select the appropriate namespace from the list provided. You're probably going to have to do this for every instance of that variable in the source code.

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              D 1 Reply Last reply
              0
              • D ddecoy

                I have just one reference to the Microsoft.DirectX.DirectSound.dll, I set the copylocal to false. If i compile the errors go away, but are there after a few seconds. Where can I look for extra references ? In the project/solution file? app.config ?

                Learning without thought is labor lost; thought without learning is perilous. (Confucius)

                M Offline
                M Offline
                morten112
                wrote on last edited by
                #7

                Have you tried writing the full namespace and class name infront of the function? (if this fixes it - it is a simple case of you have two different namespaces defined in your class with the same function definitions inside)

                1 Reply Last reply
                0
                • realJSOPR realJSOP

                  Right-click on the offending variable, select "Resolve", and then select the appropriate namespace from the list provided. You're probably going to have to do this for every instance of that variable in the source code.

                  .45 ACP - because shooting twice is just silly
                  -----
                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                  D Offline
                  D Offline
                  ddecoy
                  wrote on last edited by
                  #8

                  It doen't give me the option 'Resolve' Also I get the error if I put the namespace in front of the class

                  notifyer = new Microsoft.DirectX.DirectSound.BufferPositionNotify();

                  Learning without thought is labor lost; thought without learning is perilous. (Confucius)

                  B 1 Reply Last reply
                  0
                  • D ddecoy

                    It doen't give me the option 'Resolve' Also I get the error if I put the namespace in front of the class

                    notifyer = new Microsoft.DirectX.DirectSound.BufferPositionNotify();

                    Learning without thought is labor lost; thought without learning is perilous. (Confucius)

                    B Offline
                    B Offline
                    BurnerX
                    wrote on last edited by
                    #9

                    Did you resolve this problem? We have this same prombem on one project. Error 1 The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' and 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' Error 2 The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.CaptureBufferDescription.CaptureBufferDescription()' and 'Microsoft.DirectX.DirectSound.CaptureBufferDescription.CaptureBufferDescription()' Project compiles fine but IDE show this annoying error all time when you toutch code after rebuild. You can get this with Microsoft.DirectX.DirectSound.WaveFormat waveFormat = new Microsoft.DirectX.DirectSound.WaveFormat(); I think this cause by some Ms DLL:s. Maybe some reason this same namespace some also from another dll than C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.DirectSound.dll Or there is some kind version confict. Anyways looks that this is some kind bug that this cannot show why it give this error. And it is not any kind new thing that DirectSound is full of bugs. Secondarybyffer.PlayPosition and CaptureBuffer.GetCurrentPosition give some times random "Application Exeption" exeptions when computer is on heavy load. Most of buffer pointers are broken so if name is read position it can mean that it is inner buffer write position so you must read at least one block behid of it or you get random null bytes. etc etc. So when you program with ds just keep it mind that is something does not work it is about 50%/50% possibility that bug is on ds not on your code :)

                    L 1 Reply Last reply
                    0
                    • B BurnerX

                      Did you resolve this problem? We have this same prombem on one project. Error 1 The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' and 'Microsoft.DirectX.DirectSound.WaveFormat.WaveFormat()' Error 2 The call is ambiguous between the following methods or properties: 'Microsoft.DirectX.DirectSound.CaptureBufferDescription.CaptureBufferDescription()' and 'Microsoft.DirectX.DirectSound.CaptureBufferDescription.CaptureBufferDescription()' Project compiles fine but IDE show this annoying error all time when you toutch code after rebuild. You can get this with Microsoft.DirectX.DirectSound.WaveFormat waveFormat = new Microsoft.DirectX.DirectSound.WaveFormat(); I think this cause by some Ms DLL:s. Maybe some reason this same namespace some also from another dll than C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.DirectSound.dll Or there is some kind version confict. Anyways looks that this is some kind bug that this cannot show why it give this error. And it is not any kind new thing that DirectSound is full of bugs. Secondarybyffer.PlayPosition and CaptureBuffer.GetCurrentPosition give some times random "Application Exeption" exeptions when computer is on heavy load. Most of buffer pointers are broken so if name is read position it can mean that it is inner buffer write position so you must read at least one block behid of it or you get random null bytes. etc etc. So when you program with ds just keep it mind that is something does not work it is about 50%/50% possibility that bug is on ds not on your code :)

                      L Offline
                      L Offline
                      LimitedAtonement
                      wrote on last edited by
                      #10

                      I have the problem, too.

                      In Christ, Aaron Laws http://ProCure.com

                      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