Wcdm patent a

Well, it's very simple, just use the array to solve it:

Sample.cpp of vc

Int __stdcall fun (double a, double b, double * res)

{

RES[0]= a+b;

RES[ 1]= a-b;

RES[2]= a * b;

RES[3]= a/b;

Returns 0;

}

Sample definition of vc

export

delight

vb:

Declare the sub-fun library "sample.dll" (byval A is double, byval b is double, byref x is double).

Private subcommand 1_click ()

Dim x(4) is double precision.

fun 1,2,x(0)

text 1.text = x(0)

text2.text = x( 1)

text3.text = x(2)

text4.text = x(3)

End joint

In the above example, passing the first element of the array to the dll can bring something back as a return value.