Windows Service Calling VB6 dll doesn't work but works with VB6 
Author Message
 Windows Service Calling VB6 dll doesn't work but works with VB6

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



Thu, 23 Dec 2004 11:56:14 GMT  
 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



Sat, 25 Dec 2004 03:43:01 GMT  
 Windows Service Calling VB6 dll doesn't work but works with VB6
I can't think of any reason why this would fail.  Have you tried debugging
into the VB6 server?  Build the VB6 .DLL with no optimizations and debug
symbols.  For more info on debugging in the context of a Windows Service
see:
ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbtskdebuggingserviceapplications.htm

Cheers,
Mike Bond
Visual Basic Development

--
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



Mon, 27 Dec 2004 04:14:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Run Time Scripting Doesn't Work as Windows Service

2. Run Time Scripting Doesn't Work as Windows Service

3. VB6's MSComm doesn't work well with Vista

4. data view window doesn't work vb6.0

5. VB6, Why doesn't work this bookmark?

6. VB6/ADODB/Access97 Wildcard in SQL doesn't work

7. VB6: DBGrid doesn't work anymore....?

8. call to dll doesn't work.

9. This code used to work in VB5 now it doesn't in VB6

10. Calling DLL that has a Dir(\\share) statement doesn't work

11. PDW works with VB6 beta, but doesn't with the release version

12. VB6 ADO - SQL statement that contains REPLACE doesn't work

 

 
Powered by phpBB® Forum Software