DLLs and user-defined types



Is there any way that it is possible to do the following:

I have a project mylibrary.dpr that produces mylibrary.dll and exports some
functions.

I also have an interface file mylib.pas that references the functions
contained in mylibrary.dll that I use when I want to write code
that accesses the functions in mylibrary.dll

So far so good.....

Now, is there any way of putting user-defined types in mylib.pas such that
both any software I write and mylibrary.dpr can access them?

The only solution I can see is to have a third file for such items, which
I'd like to avoid if possible.

Thanks in advance for any help.

Rob


.