Re: Nibbles: still need help
Quote:
Just because it displays as negative is not a bad thing though - right?
In this case it's bad since he shouldn't be getting negative numbers even if they were declared as 16-bit integers.
Quote:
And how about signed long? Does such a type exist?
Actually if you are running into overflow problems, you want unsigned variables. int and long are the same thing in Win32 C++.
Re: Nibbles: still need help
Quote:
Originally Posted by moeur
In this case it's bad since he shouldn't be getting negative numbers even if they were declared as 16-bit integers.
Actually if you are running into overflow problems, you want unsigned variables. int and long are the same thing in Win32 C++.
Well now it has finally worked!!! My last change which did the trick was declaring
unsigned char DataByte[][3]
and IT WAS FAST as lightning... so I guess I'll have to include some more stuff in that dll for there's still more processing to be done...
Maybe I'm gonna need more help in the next few days. In the meantime, thanks a lot to all of you guys who've lent a hand, I feel really indebted!
Re: Nibbles: still need help
I wanted to rate you guys up but it appears that I must spread some reputation around... so next time... :)
Re: Nibbles: still need help
I'm glad this worked out for you - never had the need for speed like you just experienced (mainframe programmer from forever - only PC for past 4 years)...
When I do - I'll be asking you for help! :)
Re: Nibbles: still need help
Quote:
Originally Posted by szlamany
I'm glad this worked out for you - never had the need for speed like you just experienced (mainframe programmer from forever - only PC for past 4 years)...
When I do - I'll be asking you for help! :)
I've been in this boat before. I do most everything in VB. Once I had to make a routine that parsed about a MB of random text and scrape email addresses out of them. The VB appraoch could take hours. I wrote a C DLL which did the string parsing in seconds. Like so many others have said, the right tool for the right job...
Re: Nibbles: still need help
Quote:
Originally Posted by szlamany
I'm glad this worked out for you - never had the need for speed like you just experienced (mainframe programmer from forever - only PC for past 4 years)...
When I do - I'll be asking you for help! :)
Nobody is perfect (Osgood in Billy Wilder's "Some like it hot", 1959)
No language is perfect. C is impressive in its speed in cases like this problem of mine, but VB's IDE, features and debugging tools are great. But I'm afraid you'll have to ask other folks for help with C, what I used to know is only coming back to me slowly and painfully. :confused:
Re: Nibbles, bit operations and C dll's [RESOLVED]
If I want to pass a boolean variable to the c dll (...ByVal MyFlag As Boolean,...), what's the corresponding data type in c?
Re: Nibbles, bit operations and C dll's [RESOLVED]
A VB boolean is stored in a 16 bit signed integer.
Re: Nibbles, bit operations and C dll's [RESOLVED]
I've been lucky you were on line now... thanks! :)