Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

create null reference

I wish to create a null reference as part of an error handler.
Is there such a thing as a "Null Reference" that I can create?
Thanks
 
0 Kudos
Message 1 of 5
(3,675 Views)
I am sorry but your question seems to be too general.

A possible problem:
- you have to communicate with a 3rd party library written in C/C++;
- there is a function with one of its parameters declared as a pointer;
- you have to set a null reference for this parameter.

If this is your case,  just declare this parameter as an integer and set it to 0.

1) C++ prototype:

void Foo (char *str);

2) VB.NET:

Public Declare Sub Foo Lib "FooLib" (ByVal str As String)
Public Declare
Sub Foo2 Lib "FooLib" Alias "Foo" ( _
            ByVal str As Integer)


Foo("Fooo")     ' sends reference to this string
Foo2(0)         ' sends null reference



0 Kudos
Message 2 of 5
(3,658 Views)

I realize now that it is too general.

However, that stems from NI's usage of the term "reference".

 

I want a null reference to an ODBC VI.

I can create a constant by right-clicking on the input to the VI, but I do not understand what that does.

That may be all I need.

 

 

0 Kudos
Message 3 of 5
(3,659 Views)

This forum is titled as "Measurement Studio for.NET Languages". And you are a LabVIEW developer, aren't you? I believe you will find an answer on the forum "LabVIEW".

0 Kudos
Message 4 of 5
(3,649 Views)

My bad, must have hit the wrong button.

 

Sorry.

 

0 Kudos
Message 5 of 5
(3,644 Views)