I'd like create a dll to import data from a file (different format, for example csv, txt, xls, ...). My idea is this: the dll load the data with her "engine" then send this data to my application so my application can show them inside a grid.
This is my second DLL so I have some problems/questions.
I think my DLL should send the data to a TDataset on my application but how can I call a DLL with a TDataset as argument?
Any suggestions? What is the easiest way to accomplish what I have in mind? (if possible)
Easier way for you would be to store the data directly into database in DLL. And after import you just refresh your TDataset.
BTW, you don't "call DLL", you call some method that is public in DLL and there you can use arguments as in normal methods.
EDIT: For more generic DLLs that don't require data components just send data in struct
TMyData
{ int ID;
String Value;
};
int MyDataImport(TMyData & data)
{
...
}