Modules in DLL using modules in main prog

Modules in DLL using modules in main prog

Hi,

I have some problems interfacing my dll and my main program.
My architecture can be described as follows :
I have defined several modules in my main program, sharing data and procedures together (USE, private...).
I want to build a DLL containing modules. The procedures contained in the dll are obviously called by the program. This step works.
The other problem is that I want the modules defined in the dll to use modules defined in the main program and to share the data allocate in these modules.
Is this procedure legal and possible ?
How does it work ?
Any examples ?

Thanks, Benoit

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

I don't see any way to do this - not in the manner you're suggesting. A DLL has to resolve all of its external references when linked, you can't have it "link against" the main program. The way I would recommend handling this is to have the main pass a pointer to the data to the DLL.

Steve

Steve - Intel Developer Support

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!