PROBLEM IN STRING Concatenation DLL using using vb6 and c++ (win32 dynamic dll )
-
Hello Friends kindly see the code VB6 code given below Private Declare Function concat Lib "d:\StringConcat1.dll" (ByVal Text1 As String, ByVal Text2 As String) As String Private Sub Command1_Click() Text3.Text = concat(Text1.Text, Text2.Text) a = Len(concat(Text1.Text, Text2.Text)) MsgBox a End Sub The function of the vb code is given below. The form has three text fields a) The first text field , enter the first string b) The second text field , enter the second string c) The third text field, concatation of the two string i.e result of the two strings is shown in third text field When we call "StringConcat1.dll" dll the value entered through the two text fields is send as a argument by value to the dll and concatation of the strings is done in C++ . the dll code is given below "test.cpp" #include char* __stdcall concat(char *string1 , char *string2) { return strcat(string1,string2); } the def is given "test.def" LIBRARY StringConcat1 EXPORTS concat @1 When I debug the code , the Concatenation is done in C++ but when the result is given to vb code ie front only the first string that is entered in the first text is shown only as the output in the third text field. Kindly note the point: the C++ code works perfectly. After computation ie Concatenation , the result is not shown in the vb code Can any help me in this matter From Phijo Philip