Now I understand about how it works and how to proceed with the function wait.
At the end of the topic was directed to a very interesting question to me.
Could you please exemplify me, that way I could then receive values ​​that are being returned through the functions in the DLL without running the risk of a return check invalid?
Sample:
C++
DLLFUNC char* sql_get_select(char* buffer, char *column, int row)
DLL in C + +, this function will search from a list previously set, the values ​​that match the parameters sent by the function.
Sample in C++
...
DATA tempdata;
for(ping =0; ping < MYDATA_INDEX; ping ++)
{
if(strcmp(column,MYDATA[ping].name)==0) //found an index in the local struct with the same name searched by the function
{
tempdata = &MYDATA[ping];
if(tempdata->varchar.size())
{
strcpy(buffer,tempdata->varchar[row].c_str());
}
break;
}
}
...
return buffer;
IN LITE C
char buffer[256];
for(int a = 0; a < 10; a++)
{
sql_get_select(buffer, "name", a);
strcpy(LOCAL_TEST[a].name,buffer);
.....
//Note that my function must first find a result in a list in DLL and only then will return a correct value. Here I am running the risk of the not receiving a value on time
}
I appreciate your attention