Click here to Skip to main content
15,920,596 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionMessageBox on the client? Pin
Carolina10-Dec-01 2:35
Carolina10-Dec-01 2:35 
AnswerRe: MessageBox on the client? Pin
James T. Johnson14-Dec-01 7:30
James T. Johnson14-Dec-01 7:30 
GeneralRe: MessageBox on the client? ... and also a confirm dialogue? Pin
Carolina16-Dec-01 23:04
Carolina16-Dec-01 23:04 
GeneralRe: MessageBox on the client? ... and also a confirm dialogue? Pin
James T. Johnson17-Dec-01 2:22
James T. Johnson17-Dec-01 2:22 
GeneralThink What is the Reality Pin
6-Dec-01 22:55
suss6-Dec-01 22:55 
GeneralRelease candidate form error Pin
jkgh3-Dec-01 5:15
jkgh3-Dec-01 5:15 
Generalasp.net Pin
ov2-Dec-01 23:04
ov2-Dec-01 23:04 
QuestionHow to create circular references between DLLs/assemblies? Pin
Brian Morearty2-Dec-01 7:55
Brian Morearty2-Dec-01 7:55 
This question applies to managed C++, and I think also to C#.

In managed C++, to import a .NET API into C++, you do this:
#using "dllname.dll"
The fact that you import the DLL directly, instead of some other file (like a TLB or LIB) implies to me that circular dependencies between managed C++ DLLs are impossible. This concerns me. Frown | :( Circular dependencies are sometimes useful, as long as they're confined to a single "layer" of the architecture. (Since a layer does not have to be defined as a DLL, but a collection of DLLs that work together.)

How can I make the following example work?
File a.cpp in DLL A does this:

    #using "B.dll"
    // Call some methods in B

File b.cpp in DLL B does this:

    #using "A.dll"
    // Call some method in A
Which one do you compile first? Chicken and egg! I can't find any info about solving this on MSDN.

You don't have this problem when normal (non-.NET) DLLs import from each other, because headers are used at compile time, and because you can generate a A.EXP for A.DLL, then link B.DLL against A.EXP, then go back and link A.DLL against B.LIB.

So, without getting into a long debate about the pros and cons of circular references, how can I solve this problem?

Also, does anyone know if this is a problem in C# as well as managed C++?

- Brian Morearty
GeneralHelp with a .NET app architecture... Pin
Defcon1-Dec-01 1:37
Defcon1-Dec-01 1:37 
GeneralHelp with winform designer Pin
Brian Olej30-Nov-01 18:31
Brian Olej30-Nov-01 18:31 
GeneralVS .NET bug Pin
Matt.W.29-Nov-01 14:46
Matt.W.29-Nov-01 14:46 
GeneralRe: VS .NET bug Pin
Brian Olej30-Nov-01 10:00
Brian Olej30-Nov-01 10:00 
QuestionHow to create a container control Pin
Fairytale24-Nov-01 2:41
Fairytale24-Nov-01 2:41 
GeneralDoc/View Pin
Aza22-Nov-01 3:05
Aza22-Nov-01 3:05 
QuestionHow to get control when the property WindowState of form is changed? Pin
inside121-Nov-01 14:23
inside121-Nov-01 14:23 
GeneralNeed some big-time help Pin
20-Nov-01 15:36
suss20-Nov-01 15:36 
GeneralAbout SOAP Toolkit 2.0 High level API Pin
chenzhu19-Nov-01 15:20
chenzhu19-Nov-01 15:20 
GeneralConvince Me... Pin
bburton19-Nov-01 1:22
bburton19-Nov-01 1:22 
GeneralRe: Convince Me... Pin
l a u r e n19-Nov-01 1:38
l a u r e n19-Nov-01 1:38 
GeneralRe: Convince Me... Pin
Paul Watson22-Nov-01 7:46
sitebuilderPaul Watson22-Nov-01 7:46 
GeneralServer Error in '/lab1' Application... Pin
Orkun GEDiK17-Nov-01 11:43
Orkun GEDiK17-Nov-01 11:43 
GeneralDispose() design pattern is complicated Pin
Mike Morearty16-Nov-01 19:13
Mike Morearty16-Nov-01 19:13 
General:confused: VS:NET CR crashes my Beta1-Webprojects Pin
Carolina15-Nov-01 3:19
Carolina15-Nov-01 3:19 
GeneralVS.NET Beta 2 -> RC1 Resource problems Pin
Bret Faller14-Nov-01 10:04
Bret Faller14-Nov-01 10:04 
GeneralApp Deployment With .NET Pin
Paul Watson13-Nov-01 23:59
sitebuilderPaul Watson13-Nov-01 23:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.