Conversion of a DataModule to a RemoteDataModule


I need to convert a DataModule to a remoteDataModule.
I add my Type Library, a property to export the Provider for each
table, the interfaces, impementing all the interface functions,
I had also create the TComponentFactory.
My implementations are in the protected part

While building I got an internal error C10040 on the "end;" of an
implemented function of the interface whatever the function is.

Do anyone got an idea about this ?