Jump to content
  • 0

CSharp wrapper for dwf returns wrong error codes


blackt1ger

Question

After spending the day trying to troubleshoot while dwf.FDwfEnum doesn't work, updating adept2, updating WaveForms, rebooting computer it appears that I am receiving error codes when I shouldn't.   Sadly, you don't document  your CSharp wrapper, I assume it comports to the C dll externs documentation

How should I check for errors  or am I doing something wrong?

----- partial code snip of a routine that returns a list of devices

                int devices = 0;
                var res     = dwf.FDwfEnum(dwf.enumfilterAll, out devices);

                // res is always "1" for me.   But should be "0" for no error 

                // if I ignore the error, I do find that "devices" correctly returns "1".
                if (res != 0)
                {
                    Debug.WriteLine(DigilentWaveForms.LastError);
                    return null;
                }

        
 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...