Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

A Dll like application shared between multiple processes?

Posted on 1998-09-18
2
Medium Priority
?
174 Views
Last Modified: 2010-04-01
I have a problem which you might be able to help me with.
I have an NT server that is attached to about 20 printers.
I am printing hundreds of jobs to these printers in a short
amount of time.(Bitmaps).  I am having problems when something goes wrong with the printers.  If something
happens to one of the printers, the queue gets backed up
with hundreds of jobs before the user notices that
something is wrong.  I know printer pools, thats kinda what
I want to do.  I can't use printer pools because I have to
know what job goes to which printer.  I am trying to
program my own printer pool.  Here is where you can help.
I have devised a .dll that my application uses that
has a "Black box" set of interface instructions.  Submit Job
Get printers average number of jobs etc.....
I want to have this dll running on the server and be able to
have applications call the submit job function with a handle
to a bitmap and have the print server print the job.
I need to be able to have multiple processes attached to the
same server because I have 3 different front ends for the
jobs that need to run simultaneously on the server and over
the nt network.  Can this be done?  I know that it cant
be a .dll, but maybe there is some other method of
programming a com? or something like that that has this functionality?..  Please help

Bryan
0
Comment
Question by:bwilkins081898
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
milenvk earned 300 total points
ID: 1173102
Yes, you can do that, and yes, you can do it using COM. You need to create a single EXE out-of-process server in which you will develop your COM class and its class factory. Since the server is an out of process executable it will have its own process space and won't share the clients process space. When the server is invoked for the first time it has to register the class factory of your object using CoRegisterClassObject() API. Every time a client wants to create your object it will get the same class factory object and will ask it to create an object. Your class factory object should simply return a pointer to the interface of a single object that it has created. In this way all the client applications will share the same object. The cornerstone here is using EXE server instead of a DLL in-process server. Consider reading some COM books and examples, like "Essential COM" by Don Box, and "DCOM Professional Programming" by Richard Grimes. Good luck.
0
 

Author Comment

by:bwilkins081898
ID: 1173103
Thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question