I cannot use user-defined struct for my third party library (.dll)

Hello. I want to use my own third party library for my current unreal project.
Here is the struct.

struct DataTable
{
    int idx;
    int value;
};

Here is the dll module and function call.

DataTable p = {...};
myModule->Load(&p);

Load()'s parameter is DataTable* so it can see what values are in.
it does not work. It was empty when I called the function everytime.

But once I modified the function to accept parameter as int*, it works.

int i = 3;
myModule->Load(&i);

It seems only user-defined struct cannot be accepted as a parameter for third library function.
I really need help. I put an alphabet F in front of struct name. but it did not work, too. Does anyone have an idea to solve this problem ?

Thank you.

You should clarify what you mean by third party library for unreal project, as there are a few possible ways to build\include third party libraries

But assuming the simplest case, that your library is a separate UE’s module included as a plugin\dependency - here you should mark the classes & other things you export with __declspec(dllexport). In terms of UE it means - add the %YOUR_MODULE_NAME%_API macro (so for module named MyLib the macro will be MYLIB_API ) before the the entities you need to export