I know that this will be very easy for you guys...
After passing thru my MyFunction, the variable (MyPrameter) should now be overwritten by that previously called function. I have my Mydll.dll code below that i think there's something missing with it. Please help my with this code.
thank you so much!
Code:
'==========================================================
'MY VB CODE
'==========================================================
Private Declare Sub MyFunction Lib "MyDLL.dll" (ByVal MyParameter As String) As Integer
Private Sub TestFunc ()
MyParameter = "Original String"
MyFunction MyParameter
Msgbox MyParameter -----> string should now be
"String Overwritten"
End Sub
===========================================================
Code:
//=========================================================
//MyDll.dll in C/C++ CODE:
//=========================================================
#include ...
.
.
.
int __declspec(dllexport) CALLBACK MyFunction (LPSTR MyParameter)
{
strcpy (MyParameter, "Sting Overwritten");
return 0;
}
//=========================================================
thank you so much!