C# Skype bot (Skype4com) Windows Service

2

I've been working on a Skype bot program.

The idea is the when the user sends messages to the bot with certain keywords it will provide the results of a SQL script that is run in the background.

I've been able to get it to work as a Windows console app , but I'm trying to convert it into a Windows service.

I've tried using Top Shelf and the Visual Studio Windows service template, both are not working. I'm able to install the Windows service, but when I try to run it it fails.

I keep getting this error

Service cannot be started. System.Runtime.InteropServices.COMException (0x80040200): Not attached. at SKYPE4COMLib.ISkype.Attach(Int32 Protocol, Boolean Wait)

This happens as soon as the program tries to attach its self to Skype.

skype.Attach(7, true);

I've come to the conclusion that the Windows service and Skype are on different levels and cant see each other. I've seen other Stack Overflow questions that came back with the same results.

I was was wondering is there any way to change this or is it impossible?

c#
skype
asked on Stack Overflow Aug 5, 2015 by Aaron Berndt • edited Aug 5, 2015 by Aaron Berndt

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0