
Windows Service Calling VB6 dll doesn't work but works with VB6
I can think of two reasons why this may not be working:
* Security - By default a service runs as the System account that does not
have many permissions or context for calling the Fax Server software. You
may consider trying to run the service as a specific user account - create a
special account for the service with as few permissions as needed to run it.
* UI - The VB6 dll may have been written with the expectation it can create
windows etc. I am not sure how it creates the report, but that may need UI
support.
How have you done the error handling in your service? Are you logging errors
to the event log or similar? It would be good to know how the service is
dying - it will help dianose the problems.
Sam & Matt
VB Team
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Quote:
> Hello all,
> I have created a Windows Service who's function is:
> 1. Read from a text file.
> 2. Call a VB6 dll who's function is to use Crystal Reports to
convert/export
> a report in memory to rtf format and then fax it using W2K's Fax Server.
> So the chain of events is:
> IVR Saves text file to disk --> Windows service reads text file containing
> fax info and calls VB6 dll passing that info --> VB6 dll creates report in
> memory and saves report in rtf format to disk --> VB6 dll calls W2K Fax
> server and faxes report.
> Problem: When I call this dll from a VB6 app all works fine. Absolutely
no
> problems. However, when I do the same thing with my Windows Service the
> thing doesn't work. I don't get it. I know the windows service is
passing
> the info to the dll ok but for some reason it's dying in the dll. I know
> this sound obscure but anyone have any ideas why this would work from a
VB6
> App and not from a Windows Service?
> Thanks in advance,
> bill