BSFN to save .par-Files without "Select folder"-dialog


Hey guys,

I got the following request to fulfill:

I have to save the .par-files when checking in my objects by skipping the "Select folder"-dialog and providing a default target path.

The "Select folder"-dialog is getting poped up in the DLL-functions.
I already managed to find the .dll-function (DLL: OMWBASE.dll, function: ExtractToPAR) which extracts the .par-file of an object.
Also I made a testproject in C++ to execute the ExtractToPAR function:

#undef UNICODE
#include <windows.h>

//The syntax of the ExtractToPAR function in OMWBASE.dll
typedef int(__stdcall *MyFunction)(wchar_t const *, class JDEString const &, wchar_t *, int);

//Our function prototype
void CreatePARFile();

int main()
    //Simple Call the function

void CreatePARFile()
     //Load the DLL into memory
    HMODULE hDll = LoadLibrary("OMWBASE.dll");

    //We get the address of the function inside the dll.
    //Then we typecast it to fit the function's syntax.
    MyFunction ExtractToPAR = (MyFunction)GetProcAddress(hDll,
       "[email protected]@@[email protected]@[email protected]@[email protected]");

    //code above this line works properly

    //We can now call the function
    ExtractToPAR(/*I don't know what to provide ehre*/);   //(wchar_t const *, class JDEString const &, wchar_t *, int)

    //And don't forget to free the memory

Now I'm facing the following problems:

Since the OMWBASE.dll is a native DLL there is literally no documentation, support, code/codehints or anything compareable to the DLL, which means I have to maybe guess the parameterlist?

As you can see in the typedef the ExtractToPAR function takes a JDEString as parameter, also for this class you can't find anything.
How can I initialize a JDEString?

When this code works I'll paste it into a BSFN and call it from the Checkin-button in OMW.

fyi: I never practiced C++, so don't be to critical about the code.