S
Shahzad Atta
Hi All,
I had a Win32 executable that does some media encoding stuff. As I need to
encode more media I decided to make it a windows service. To use it easily
in windows service I decided to wrap that exe in a Win32 dll. After
compiling the dll in STA mode I added the import directive in my c# windows
service. In the service constructor I spawn a new thread and call a method
of that dll.
Now if I run this exe as stand alone it works fine. If I run the service as
a program (doing F5 in VS 2008) it works fine. As soon as I install/register
it as a service and run it via SCM the method does get called but no
processing occur and it immediately returns from the dll call (I debuged
that service by attaching to process). I am not sure if the call ever get to
the method as on the very start of method we have added some logging to
trace the error but no log file gets generated.
Any ideas or pointers? On another note, I am executing this service under
administrator account as the dll needs to read and write files from the file
system.
Regards,
Shahzad Atta.
I had a Win32 executable that does some media encoding stuff. As I need to
encode more media I decided to make it a windows service. To use it easily
in windows service I decided to wrap that exe in a Win32 dll. After
compiling the dll in STA mode I added the import directive in my c# windows
service. In the service constructor I spawn a new thread and call a method
of that dll.
Now if I run this exe as stand alone it works fine. If I run the service as
a program (doing F5 in VS 2008) it works fine. As soon as I install/register
it as a service and run it via SCM the method does get called but no
processing occur and it immediately returns from the dll call (I debuged
that service by attaching to process). I am not sure if the call ever get to
the method as on the very start of method we have added some logging to
trace the error but no log file gets generated.
Any ideas or pointers? On another note, I am executing this service under
administrator account as the dll needs to read and write files from the file
system.
Regards,
Shahzad Atta.