LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error with DLL

Hi,
 
I have created a DLL file and now I am trying to pass parameters to the DLL... the parameters i would like to pass is the IP Address of the sensor, a string (this will be generated from .NET but can be anything... eg. "", abc or even 123) and lastly a boolean which controls a button... the vi i've created works perfectly fine... so i do not think is the vi's problem..
 
when passing a valid IP Address over to the DLL, i get an error 54 (i've attached a screen shot of it)... i cant test what the value was passed over as its an DLL (or is there a way??)... another problem is when i pass a True value over, i get an error too (this time its from .NET)...
 
the biggest problem is how to check whether the DLL file i've created is a valid DLL file?? when i add the DLL file as references (just for testing only), an error pop up and say "the file cannot be added and only assemblies with extension "dll" ... can be referenced.. "
 
Any help is appreciated.. Smiley Very Happy
thanks in advance Smiley Wink ...
Best Regards,

JQ

LV 8.0 user...
0 Kudos
Message 1 of 3
(2,909 Views)
Hi again,
 
i've modified my vi to save the data passed through the parameters into SQL and the result returned a single character (eg. the string pass was testing, but the data save is only "t")... so i think i can conclude that i recieved that error 54 is because the IP address wasnt complete...
 
First point: i think it only passed a single character rather the whole string is due to the parameter set as "void testing(char ipadd[], char teststring[], LVBoolean *Save)"... from my understanding, char only stores 1 character?? correct me if i'm wrong...
 
Second point: when compiling a DLL, i noticed there are 3 options; String Handle Pointer, C String Pointer (default) and Pascal String Pointer... can someone advise me on what are the 3 and when to use each of them?? i've tried to compile using each of them, and only the default pointer gave me LV error.. the other 2 gave me .NET errors... so i can conclude that using the other 2 is not suitable for .NET (i get some exception error telling me about some object error)??
 
Third point: i noticed that some examples come with .bld files... how come when i build my DLL file, the .bld file doesnt appear.. is it necessary??
 
Sorry for asking so many questions at once... thanks in advance Smiley Very Happy ...
Best Regards,

JQ

LV 8.0 user...
0 Kudos
Message 2 of 3
(2,899 Views)
Hey JQ,
    Check out this link.  It talks about using LabVIEW strings to send to dlls.  I hope it helps!!


Brian B
Account Manager
National Instruments
Message 3 of 3
(2,882 Views)