Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Two DLL Assemblies

$
0
0

Hello

I had developed .NET Library C# Assembly AUT.DLL 6 months ago and works very well. It gets loaded in memory by AUT.EXE and is responsible for obtaining data (thru Socket TCP/IP) from another executable application running on same computer. In, AUT.DLL, I had implemented the starting class as a singleton class ...

public class Manager
{
  private Manager();
  private Manager self = null;
  public static void CreateManager()
  {
    if (self == null)
      self = new Manager();
  }
}

Now, next part of assignment where I am stuck is as follows.

I have to develop another C++ library (APLUG.DLL). It must be a DLL ONLY and has to be to kept in one specific folder. This DLL gets loaded by another 3rd party legacy app as a plugin and it is meant to  tap to the same data that AUT.DLL manages. Problem is that APLUG successful initialization heavily relies on AUT.EXE having already completed some of its initialization steps or fail with error. APLUG must never create Manager but it should use the same Manager object created by AUT.EXE. If AUT.EXE is not running or it has not yet created Manager, then I want APLUG.DLL to fail with notification.

One way I am thinking of is to create one class that exposes a COM interface in AUT.DLL which the APLUG.DLL will attach to. For this, I have two problems (a) I do not want to revisit COM programming in C++. (b) I do not want to expose COM to other client or client apps. It is only meant to be between these two DLLs.




Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>