Hi All,
I spend Last 45 days to deal with dll i got lots of advantages of dll for my big project management.
As Well as in every 2 Hours I got new milestone problem.
--------------------------------------------------------------------------------
Problem :-
I used dll function with
_descpsec(dllexport)
Which work greate,
Now lets consider following scenerio,
A function called
TwoString()
Normal dll function that fill strings in dll.
extern "C" __descspec(dllexport)void WINAPI TwoString(CString* First,CString* Second)
{
Cstring tempstr,tempstr1;
tempstr="SANTOSH";
First=&tempstr;
tempstr1="DHANAWADE";
Second=&tempstr1;
}
This dll function works greate now,
As i passed the pointer as function argument then string of that pointer must be updated.
Lets take following function call
CString Name,Surname;
Name="";
Surname="";
TwoString(&Name,&Surname);
As I thing values of Name and Surname should change after DLL Called.
but Not Changed.
I have try:
1)I doesn't want implement structure or StringArray for return value.
2)Function can return only one values.
3)When i debug program pointers of Name And Surname not changed untill
First=&tempstr;
Statement.
____________________________________________________________________
All related helps,Links,codeblocks,suggestions are welcome.