Problem opening the print engine in a Windows service
From: RenDawg (RWerner_at_zolldata.com)
Date: 02/24/05
- Next message: Sven Neibeg: "supreports or second way"
- Previous message: jcgraf_at_gmail.com: "Creating "free standing" count fields"
- Messages sorted by: [ date ] [ thread ]
Date: 24 Feb 2005 07:30:16 -0800
I am having a problem opening the print engine inside of a Windows
Service and was hoping that someone out there might be able to point me
in the right direction as to a possible solution.
Some background information:
I have two apps, one is a service and the other is a configuration
utilty. The configuration utility allows users to configure which
reports the service is going to run, when to run them, which printer to
print to, etc. The configuration utilty also has the ability to
perform a "test run" to make sure everything is working correctly so
users can confirm that the configuration setup is correct.
The code that is executed when the user runs a report from the
configuration utilty and when the service runs the report after
receiving a timer event is exactly the same (and I do mean the same,
they both call a separate dll which goes to the database, gets the
configuration information, opens the print engine and runs the report).
However, for some unknown reason (or at least I have currently been
unable to figure it out), the whole process works fine if you go
through the configuration utilty, but not if you go through the
service.
I've debugged into the service and it is correctly instantiating the
dll and calling the routine to run the report (I know this because I
can debug into the dll routine from both the service and the
configuration utility), but is failing on the PEOpenEngine call. I've
gone and done the subsequent call to PEGetErrorCode to get the error
condition associated with the the open engine call and the error code I
am getting back is 512 or PE_ERR_ENGINENOTOPEN (which I find rather
confusing as well, since that is precisely what I am attempting to do).
Now I have the service logging itself on as a specific user (the same
user that is running the configuration utility), so the only thing I
can think of that is different is the fact that the open engine call is
occuring inside of a Windows Service.
If anyone has any ideas on how to get around this issue, I would be
most grateful.
Thanks,
Renny
- Next message: Sven Neibeg: "supreports or second way"
- Previous message: jcgraf_at_gmail.com: "Creating "free standing" count fields"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|