01-15-2007 09:55 PM
01-16-2007 12:09 AM
Hi JQ
In your vi there is just a casestructure with a message box express vi in it. I think you have to revise it, as you said you have problems with a dll-call.
01-16-2007 01:02 AM
thanks becktho for the reply... as you noticed, the vi i attached was a very simple break down of what i intend to do... my main objective is to use VB .NET to pass boolean parameters over to the DLL, which is created using LabVIEW...
the current problem i'm facing is i am able to pass Strings from VB .NET to the DLL but not booleans... whenever i pass booleans over, i get some error that they cannot find an entry point...
sorry for being vague in my explaination ...
01-16-2007 01:39 AM
I can't see your code, but generally, BOOL should be defined as a numeric and not as a string.
I don't think it matters which type of numeric it is, since I believe only the LSB is used, but you should read the documentation on this to be sure. There is quite a long document on this which is shipped with LV (or maybe it's part of the manual?).
You can learn more by searchinig the site.
01-16-2007 02:38 AM
01-16-2007 03:07 AM
01-16-2007 03:18 AM - edited 01-16-2007 03:18 AM
Message Edited by daveTW on 01-16-2007 10:20 AM
01-16-2007 03:45 AM
thanks tst and dave... i think this may be the problem ...
In LabVIEW, a Boolean is one byte. In Microsoft Visual Basic, a Boolean is two bytes. In Microsoft Visual Basic, if you declare variables as Booleans, the memory becomes corrupted or overwritten. Instead, you must declare each variable as one byte. The Booleans are passed by ref because they are set up as pointers to values.
quoted from: http://zone.ni.com/devzone/cda/tut/p/id/3188#toc1
although this is VB... but i think VB and VB .NET should be using the same data type.. if i succeed i'll inform you guys again... thanks a lot for the help...
01-16-2007 05:16 AM
@JQ wrote:
thanks tst and dave... i think this may be the problem
...
In LabVIEW, a Boolean is one byte. In Microsoft Visual Basic, a Boolean is two bytes. In Microsoft Visual Basic, if you declare variables as Booleans, the memory becomes corrupted or overwritten. Instead, you must declare each variable as one byte. The Booleans are passed by ref because they are set up as pointers to values.
quoted from: http://zone.ni.com/devzone/cda/tut/p/id/3188#toc1
although this is VB... but i think VB and VB .NET should be using the same data type.. if i succeed i'll inform you guys again... thanks a lot for the help...
And in Win32 API a BOOL is 32 bit. It's amazing how even Microsoft can not decide what is best.
Rolf Kalbermatter
01-16-2007 10:05 PM
thanks Rolf for pointing that out...
i've finally solved the problem (i think)...
it seems that VB .NET is much "smarter" compared to VB 6.0 as i do not need to convert the value to Byte before passing over the value .. for some reason its seems as though i can declare the data type as Boolean and it still works to expectations
...
i'll post the codes here and if anybody is interested can take a look... if any bugs found please inform me and i'll do so if i found any... thanks to all who helped me out... great learning experience with you all