?
Solved

A Dll like application shared between multiple processes?

Posted on 1998-09-18
2
Medium Priority
?
173 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.
Suggested Courses

770 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