Skype Logo
Buy Skype Credit · Help ·
  • Download
  • Use Skype
  • Business
  • Shop
  • Account
  • Home
  • Get Connected
  • Features
  • Mobile
  • Prices
  • Share
  • All

Skype Community

  • Skype Community
  • English
  • Development, Betas...
  • Public API


Microsoft Visual C# 2008 Express Example Skype4COM

This Example Project with Source Code Supports ALL Event Handlers


TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


**** API SEND COMMAND ABILITY IN LATEST VERSION 1.0.31.12 ****


**** Now Uses Skype4COM 1.0.31.0 Beta Release ****


Links to DevZone and DevZone Help Pages for Online References






NOTE: If you have installed an earlier version not using 1.0.31.0 Skype4COM please remove it via Add/remove programs from your control panel. Because the Project name was changed to support multiple Skype4COM releases now and in the future. Of course you may keep both versions, but it could cause some confusion, Thanks.

Here are some of the things this example shows or can do:

  • Debugging tool alongside your application
  • Easily modify text output for testing events or situations
  • Captures ALL events as of Skype4COM 1.0.31.0
  • Works With both 32 and 64 bit versions of Windows
  • Dealing with Skype4COM ambiguity issues
  • How to include Skype4COM in your project
  • How to use the version of your choice of Skype4COM
  • How to use multiple versions of Skype4COM at same time
  • How to use Skype4COM without registering it
  • How to open a web page to Download Skype if not Installed
  • List of known issues found with 1.0.31.0 API/Skype4COM
  • Displays many Skype properties at Skype User logon
  • Shows use of waited attachment logic
  • Shows use of non-waited attachment logic
  • Shows how to start Skype from an application
  • Shows how to deal with program authorization
  • Shows how to deal with Program authorizations for multiple Skype users
  • Shows use of Silent Mode
  • Shows how to go away at Skype user logoff
  • Shows how to go away at Skype program exit
  • Shows how to Survive/Recover from mutiple Skype logoffs/logons
  • Shows how to Survive/Recover from Skype program stops/starts
  • Shows how to deal with Skype user change and program authorization
  • Shows how to deal with having your application denied by the Skype user
  • Shows proper recovery and error logic with Skype4COM
  • Auto-Debug and invoke the debugger dynamically and automatically
  • How to send API commands
  • How to use Blocking/Non-Blocking API commands
  • How to use the API Expected Text option
  • How to use API command Id option
  • Shows how to use Windows System Timer logic
  • Shows how to deploy applications using Microsoft ClickOnce technology
  • Shows application deployment and Installer methods
  • Shows how to have your program listed in Add/Remove programs
  • Shows how to open default browser window for help from your application
  • Shows how to use the FREE Microsoft Visual C# 2008 Express
  • Shows how to avoid using the registry using .NET User properties instead
  • Shows use of NotifyIcon, Taskbar, Context Menu by Project User Settings
  • Shows use of .NET 3.5 and C# 2008 latest versions from Microsoft
  • Shows How to Auto-Update your application using ClickOnce Technology
  • Shows How to use a PayPal donation link
  • Shows How to use a link back to your web site.
  • Learn interfacing to Skype4COM FAST!
Now you say "But what do all these check boxes and links do?"

"Exit on User Logoff" and "Exit On Skype Stop" check boxes when checked will cause this application to exit when the Skype user logs off or the Skype Client is stopped.

"Start Skype if Needed" when checked will cause this application when started to start the Skype client if it is not already running. If the "Start Skype if Needed" check box is started after this application has started and the Skype client is not started, it will be started as well.

"Enable Silent Mode" if checked when this application is started, and the Skype client is already running a set silent mode request will be sent right away. If the Skype client is not running when this check box is checked a set silent mode will be queued and take place once this application successfully attaches to the Skype client. Setting Silent Mode causes the Skype client to NOT open any windows. Silent mode will remain set until the Skype icon on the toolbar has been clicked.

"Use Auto Debug" if checked will offer you a choice to Abort, Continue or invoke the debugger automatically debugging this code. This is an excellent method to drop into debug and view variables to see what went wrong automatically. This logic can also remain in place and simply be set to false when the same code is released to the public so that it can be used for testing of future versions. When "Use Auto Debug" is not checked, there will only be a message placed in the text box that an error has occurred. NOTE: To Use Auto Debug dynamically to drop into Debug and display the code where the program encountered a problem, you would need the project files and would need to be running in debug mode as well.

"Start Minimized" when checked and this application starts the Skype client by using the "Start Skype if Needed" check box, will start the Skype client minimized. The Skype client will only start minimized if auto-logon is being done, otherwise the Skype client window needs to display so that a Skype user name and password can be entered.

"Start No Splash" when checked and this application starts the Skype client by using the "Start Skype if Needed" check box, will start the Skype client without the Skype Splash box that normally appears when Skype is started.

"Hide API Window" when checked does not display API commands, API error messages, or API reply messages. There are things that go on in the background with Skype4COM which use API messages. If you are only using Skype4COM methods and not sending RAW API commands, you may not have a need to see these messages, so these messages are contained in their own window so that you can decide if you need to view them. All of the API check boxes and command and expected text boxes are hidden or appear based on this check box.

"Logging On" when checked will log messages to both the Skype4COM message window and the API message window. When not checked, message logging does NOT take place. This is so you can scroll back and look at older messages if needed. This is the only check box that is not saved at program exit. If it was, you would start this application with logging disabled, and might not realize it.

"Always Start as FirstTime = True" when checked will reset the FirstTime switch and this program will act as if this is the first time this Windows User has run this application. There is some first time application logic that is only done when this application senses it is the first time that this Windows user has run this application, such as prompting right away that they need to approve the use of this application using the Skype Client. Normally, once one successful attach request has completed for this Windows user ("This Windows User might have MANY Skype names") the FirstTime switch is set to false, and a 30 second timer is set to warn the user vs warning the user right away that they may need to approve this application. This check box can be checked, then by deleting any Skype user authorization for this program for the Skype user you are testing with and then stopping this application and re-starting it will has reset FirstTime as true again so you can test how inital program authorization by the Skype client is handled, many times and many ways. Also, once FirstTime is set to True, which you can see is the case in the logged messages at this program initialization, you can uncheck this check box if needed to see the FirstTime switch set to false again. You can make sure that you delete ANY authorization for this program for this Skype use is deleted and removed by going to the Skype client and doing: Tools -> Options -> Advanced -> Manage Other Programs Access To Skype and then remove any authorization for this program and click Save. You can now do testing as if this is the first time this program attempted to use the Skype Client for this Windows User.

"Always Use Non-Waited Attach Request" when checked will never set a Skype attach request to wait for a response. In most cases, this is the best method to use to attach to the Skype client, however your application may want to use a waited attachment request that is based on the timeout value of Skype4COM which is normally 30 seconds. If this check box is not checked, it shows how to wait for a response from the Skype client on a attachment request ("Once the API is available") and shows how to extend that time "in this case to 60 seconds" and try again, if the initial attach request times out. By removing any authorization record for this program from the Skype client for a Skype user, and then starting the Skype client, without logging on, and having this check box unchecked, and then starting this application, this will show and invoke this timeout logic, if you do not approve this program from the Skype client. It is a way to see the difference between a waited and non-waited attachment request. You can even see the difference in using a waited attachment request vs a non-waited attachment request and how the waited attachment request hangs both the GUI and the program while waiting for the waited attachment to complete, because this program is single threaded.

"Click For SaveOnTelephoneBills.com" points to a new web site I am in the process of keeping much more Skype examples On.

"Click To Donate" Allows you to donate any value you feel is justified for this example project with source code, it also shows how you can use PayPal as well to accept donations for your software.

"Use Blocking" When checked sends API commands using Blocking.

"Use Command Id" When checked sends commands with a unique number of 10,000 or greater so that you can track commands generated by this program vs the Skype client or Skype4COM.

"Save Text" When checked leaves text after command is sent otherwise text is cleared. Commands are sent when the ENTER key is pressed in the Command or Expected Text text box and a command is present in the Command Text Box. Whem checked the last text entered in both the Command and Expected text boxes will be saved and used the next time the program is started by the same Windows User.

"Retry Command Timeouts" When checked will attempt one more time to send a command.No logic was added to check if this program was attached or if the Skype client was logged in, or started so that you can see what will happen in these situations.

"Command Text" ANY...API command can be entered here and will not be sent until the ENTER key is pressed while the cursor is in the Command or Expected text box and the Command Text box contains text.

"Expected Text" will be attached to the command and be received with the Reply. This helps to carry any data in your program that you may need to match with when a Reply is received. The API command will not be sent until the ENTER key is pressed while the cursor is in the Command or Expected text box and the Command Text box contains text.

Check Box values are saved prior to program exit ("Minus the "Logging On" Check Box") by using the .NET user settings, they do not use the registry, however they are based on a per Windows user id, not on a per Skype name id. So there is additional program logic used besides the FirstTime switch, when a attachment response of "Pending Authorization" takes more than 30 seconds before a successful attachment response is received, the Skype user is prompted to check the Skype client to see if this application needs to be approved. This warning, message box currently will then be displayed every 60 seconds, using a Windows system timer until the application is approved or stopped.

"Click For Help With This Program" will open a browser window ("Your Default Browser")to the forum, where a thread that contains the entire project can be downloaded and you can post messages about questions or any help you may need with using this application.

"Click For DevZone Help" will open the DevZone Home page in your default brower when clicked.

"Click For Skype4COM Help" will open the DevZone Skype4COM Help Home page in your default brower when clicked.

"Click For API Help" will open the DevZone API Help Home page in your default browser when clicked.

Added additional logic that shows ALL combinations of NotifyIcon and Taskbar as well as sharing Context Menus, using mutiple Context Menus, Restricted Exit logic and much more. I wrote an article about this, and this code is also available as a Stand-Alone Visual Studio C# Project Template as well. More here:

http://www.codeproject.com/KB/cs/NotifyIconExample.aspx

Any of these user settings can be set to true or false, so that they become the default check box settings by changing the Project -> Properties -> Settings associated with the check box in question and then clicking the Synchronize button.

This application can help you emulate, gather, view and test almost all features of the API/Skype4COM. It can be modified very quickly and easily to provide any detail you may requre and it can validate if your application is in fact processing Skype events properly.

Even IF you do not have any desire to use the C# language or .NET, this is a "Must Have" tool that can save you many hours of trouble-shooting and development time for your 3rd party Skype application.

It can show you techniques that will help make your 3rd party applicaton work for ALL Skype for Windows clients and versions and will help make your application "Rock Solid" for your end users.

Enjoy, I hope this helped show how to interface to the Skype client as well as how easy C# is to code in and that you can create applications for FREE using the Microsoft Visual C# Express Edition.

The SEHE.zip attachment contans the Entire Project and includes ALL source code, ClickOnce Install Logic, installs Skype4COM .dll so your application can use the Skype4COM .dll version of your choice, leaving any registered version of Skype4COM as it was. This concept allows your application to run without Skype4COM already installed and/or regstered, such as the Skype Business version, which does NOT contain Skype4COM in the install and this concept requires no Extras Manager as well.

This example also shows how to use "Microsoft ClickOnce" technology which in combination with WinZIP Self-Extractor which has a free 30 day demo can be used to create installer files that automatically take care of the install as well and uninstalls using the Add/Remove programs.

This is a great example even if you do NOT use .NET or Visual C# because it shows coding techniques to deal with Skype Attachment logic, as well as Authorization logic.

.NET 3.5 is automatically installed as well at Install time, if needed, using Microsoft ClickOnce methodology when/if needed automatically at end user install time on a per user basis.

It also deals with how to get around some of the ambiguity problems, and has notes on what API/Skype4COM functions that currently have problems or issues as well.

It can be very helpful for debugging as well.

If you want to see the ClickOnce Published files that were used to create the above .exe, and don't want the source code or the entire project, simply click the link below to install using Microsoft ClickOnce Technology:

http://www.saveontelephonebills.com/skype/SEHE/

The SEHE.zip attachment file below, contains ALL files. Including the project files, source code, ClickOnce Published Files.

The Goal of this example is to show using Skype4COM Lib from project design, to use of Skype4COM lib features and finally end user installation.

Deployment and Automatic Updates are provided by Microsoft ClickOnce Technology which is a part of Microsoft Visual C# Studio Editions, including the Express Edition which is FREE, which means there is NO need for a setup project or any 3rd Party deployment software. This also allows SEHE to Automatically Update as well when there are changes.

Any of the example install methods can be removed via the Add/Remove programs located in your control panel and do NOT require a Skype4COM .dll or Extras Manager to be pre-installed on the system in question.

This program will use Skype4COM .dll 1.0.31.0 even if another version of the Skype4COM .dll is registered and already installed on the system it is installed on.

This program will leave any Skype4COM .dll registered as it was on the system in question, while it is present and after is is removed.

To build the project, without errors, you may need to create a test key if you receive an error at build time about no key. To do this, click on Project -> SEHE Properties -> Signing -> Create Test Key ("Enter Password of your choice") and re-build the project. If your current registered version of Skype4COM is less than 1.0.31.0 you can click the unregister.bat file and then the register.bat file ("Both included in the SEHE Folder") to register the copy of Skype4COM 1.0.31.0 included in the .zip project files.

The MultipleS4CExample.zip should ONLY be used after you have installed the SEHE - Skype4COM Event Handler Example. This is because when you run the SEHE.exe file from this folder it will NOT check to see if .NET 3.5(SP1)is already installed on your system. A check with the normal install of of the SEHE - Skype Event Handler Example does do this, and if and when needed .NET 3.5(SP1)will be installed on your system and running SEHE.exe will not cause errors at runtime because .NET 3.5(SP1)is not installed. This shows how to switch and use mutiple Skype4COM lib versions quickly and just for the SEHE.exe program, while leaving the registered version of Skype4COM registered at the time of the Skype client install alone, and as it was for ALL other 3rd party Skype Application and Extras on the system in question and only using a different version of Skype4COM lib for SEHE.exe. To use this example, download it from the attachments and then right click on MultipleS4CExample.zip and choose Extract All. Please read the ReadMe.text file included in MultipleS4CExample.zip. This Example includes versions 1.0.28.2, 1.0.29.0, 1.0.30.0 and 1.0.31.0 versions of Skype4COM lib. It is perfectly normal for example, when using the SEHE.exe ("Which was built using Skype4COM lib 1.0.31.0") file from this folder with an older Skype4COM version less than 1.0.31.0 to list an error when any method is not supported by the older version of Skype4COM Lib, SEHE.exe will not abend when this happens, it will continue after reporting the error.

This version 1.0.31.12 senses that the Skype client is NOT installed, opens a browser window to the Skype download page, waits for the Skype client to be downloaded and installed, and attaches to the Skype client, once a Skype User has logged on. If you have version 1.0.31.7 it will auto-update next time it is started, using Instant-Update, Microsoft ClickOnce Technology.

You will need to do an Add/Remove of any older version of SEHE from your Windows control panel because SEHE was changed to support 32 and 64 bit versions of Windows and ClickOnce technology can't force an auto-update when it includes a platform change. Hopefully finding this out will also help others as well.

Current Version is 1.0.31.12 ("Supports NEW Skype4COM Lib Beta 1.0.31.0") Flashes Icon as Skype4COMLib and API messages are received.

The SEHEwc.zip file attachment here now is a C# Project Template file, that can be dropped into your Visual Studio C# Project Template Folder, as is ("Do not unzip it"), which is normally located here:

My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual C#

If you want to auto-install this template into your Visual Studio C# Project Template folder automatically using the Visual Studio Content Installer, you can do this instead of manually placing the SEHEwc.zip file,located below, in your C# Project Template Folder by clicking here:

http://www.saveontelephonebills.com/skype/SEHE/SEHEwc.vsi ("This file type is not supported on the forum.

You will need to register the Skype4COM.dll on your system for projects built from the Template to build. Once the Template is installed, from Visual Studio C# simply do:

File -> New Project -> Select the SEHEwc Template - > Pick a Project Name

Once the Project is created, and Skype4COM is or was already Registered, do:

Build -> Build Project

You now can add any logic for testing and debugging that you might need.

This new method allows you to have many SEHE projects for testing at once. So for example, you maybe testing calls with one version and chats with another, so now you can have multiple test projects in progress, without mixing all your logic into one project, which was the case before.

You can see SEHE in action first if you like by installing it here, please allow .NET 3.5(SP1) to be installed if you do not have it already:

http://www.saveontelephonebills.com/skype/SEHE/
Attached File(s)
Attached File  SEHEwc.zip ( 61.7K ) Number of downloads: 2632
Attached File  MultipleS4CExample.zip ( 2.14MB ) Number of downloads: 3954
 


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat May 31 2008, 06:07 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


Included Muti-Skype4COM Example MultipleS4CExample.zip attachment in the post above.

Note: You must have a version Visual Studio C# 2008 installed or have installed the SEHE Example first from one of the other 2 attachments in the above post FIRST, so that you don't fail because .NET 3.5 is not installed to use the MultipleS4CExample.zip attachment above.

You can download and use the Microsoft Visual C# 2008 Express Edition here if you need it. It uses the latest version of .NET 3.5 and is FREE as well:

http://www.microsoft.com/express/vcsharp/


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat Jul 5 2008, 20:01 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


Added Microsoft ClickOnce Deployment and Auto-Update version of SEHE so it NEVER is out of date, when there are any updates you will ALWAYS be informed and asked if you wish to update or continue. More Detail here:

http://forum.skype.com/index.php?showtopic=186891

Or....Click the link below to install SEHE now:

http://skype.saveontelephonebills.com/SEHE/publish.htm

Note, this only installs SEHE, to get the source code you still need to download the entire project if desired from the .Zip file link in the post above.

This does however, allow you to try SEHE first, to decide if you want to see what is "Under The Hood" quickly, while also always having the ability to run the most current version, without checking here first.

SEHE can easily be removed via the Add/Remove programs.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sun Aug 17 2008, 19:50 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


Added A Donate Link in the latest release to show how you can use PayPal as well in your application for donations. You can install the release quickly by clicking on this link, using Microsoft ClickOnce Technology here:

http://www.saveontelephonebills.com/skype/SEHE/

If you had release 1.31.0.1 just running it will allow you to auto-update to this release.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Mon Aug 25 2008, 21:23 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


This version 1.0.31.3 senses that the Skype client is NOT installed, opens a browser window to the Skype download page, waits for the Skype client to be downloaded and installed, and attaches to the Skype client, once a Skype User has logged on. If you have version 1.0.31.2 it will auto-update next time it is started, using Instant-Update, Microsoft ClickOnce Technology.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Wed Sep 10 2008, 06:46 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


If Anyone had any problem installing SEHE from this link:

http://www.saveontelephonebills.com/skype/SEHE/

It was because I forgot to sign the ClickOnce manifest, it worked during testing, because I tested with the same computer I published with. It will work now.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Fri Sep 12 2008, 13:20 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


SEHE has been tested with the new release of the Skype client 3.8.0.180 but NOT recomplied or redistributed because of it.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Fri Oct 10 2008, 12:39 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


Changed SEHE to work with latest Protocol 8:

https://developer.skype.com/Docs/ApiDoc/Skype_protocol

Changed SEHE to work with both 32 bit and 64 bit versions of windows.

NOTE: You will need to do an Add/Remove of any older version of SEHE from your Windows control panel because SEHE was changed to support 32 and 64 bit versions of Windows and Microsoft ClickOnce technology can't force an auto-update when it includes a platform change.

Hopefully finding this out will also help others as well.

To Install the latest version of SEHE click here:

http://www.saveontelephonebills.com/skype/SEHE/


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Tue Oct 28 2008, 07:37 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


1.0.31.9 - New Version of SEHE.

Added additional logic that shows ALL combinations of NotifyIcon and Taskbar as well as sharing Context Menus, using mutiple context menus and much more. I wrote an article about this, and this code is also available as a Stand-Alone Visual Studio C# Project Template as well. More here:

http://www.codeproject.com/KB/cs/NotifyIconExample.aspx

Tested With:

Skype4COM Lib version 1.0.31.0
3.8.0.188 Standard Version
3.8.32.188 Business Version
4.0.0.169 Beta Version

SEHE will Automatically-Update next time you run, but you may wish to download the new Project Files.

If you do not have SEHE already installed, you can install SEHE using Microsoft ClickOnce Technology here:

http://www.saveontelephonebills.com/skype/SEHE/

SEHE can be removed at Anytime using your Add/Remove Programs Icon using the control Panel.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Fri Nov 21 2008, 22:16 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


New version 1.0.31.11 - New Version of SEHE.

Now supports Project templates so that you can have different project names for testing SEHE as well. See the First Post for more detail.

Simply run your version of SEHE and it will automatically update to the new version or install SEHE for the first time here:

http://www.saveontelephonebills.com/skype/SEHE/


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sun Nov 30 2008, 09:51 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


New Release of SEHE 1.0.31.12 that flashes the Icon in the System tray as messages are received.

If you have SEHE set to Hide the API window, then the Icon in the System Tray will not flash when API messages are sent or received only When Skype4COM events fire.

The SEHE Visual Studio C# Project Template was not updated for this feature.

If you already have SEHE installed, simply start SEHE and it will realize that a new update is available, and prompt you to update SEHE, because it uses Microsoft ClickOnce Deployment and Auto-Update features as does the SEHE Visual C# Project Template.

If you do not have SEHE installed and wish to install SEHE, click this link, to do so using Microsoft ClickOnce technology:

http://www.saveontelephonebills.com/skype/SEHE/


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Mon Dec 1 2008, 23:04 · Reply · Quote and reply · Permalink · Top ·
Dynamo321
Regular member
Posts: 12

**


I created a new project as per your instructions and get no build errors, however when I run the project, my status stops at:
"Our Code - Skype Attachment Request Non-Waited Sent"
and I wait infinitely for something further to happen.

When I run the demo MultipleS4CExample on the same computer I get all the way through the process and stop at:
"Our Code *** Check The Skype Window to Allow this Program *** - Check New Events at the top right of the Skype Window - Then click on the link under plugin authorization"

So something obviously must be wrong with my instance of your solution. Can you please advise me as to what to do? Thank you so much!

Great work on what I have seen so far by the way. Quite excellent!

Thank you in advance.

Tue Dec 16 2008, 05:56 · Reply · Quote and reply · Permalink · Top ·
Dynamo321
Regular member
Posts: 12

**


In addition. I am also getting these three build warnings when I build the solution:
Warning 1 Problem isolating COM reference 'SKYPE4COMLib': Registry key 'HKEY_CLASSES_ROOT\CLSID\{830690fc-bf2f-47a6-ac2d-330bcb402664}\InprocServer32\DefaultIcon' was not imported. VOIP_Test
Warning 2 Problem isolating COM reference 'SKYPE4COMLib': Registry key 'HKEY_CLASSES_ROOT\CLSID\{830690fc-bf2f-47a6-ac2d-330bcb402664}\Insertable' was not imported. VOIP_Test
Warning 3 Problem isolating COM reference 'SKYPE4COMLib': Registry key 'HKEY_CLASSES_ROOT\CLSID\{830690fc-bf2f-47a6-ac2d-330bcb402664}\MiscStatus' was not imported. VOIP_Test

Tue Dec 16 2008, 16:35 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


The Skype client in this case, has not responded to the Attachment request.

It is perfectly normal for SEHE to wait, infinitly, until the Skype client sends some sort of API status message back.

So, SEHE is doing as it should, waiting for the Skype client to tell it what state it is in, and in your case, the Skype client is not responding, which means SEHE will wait until it does.

Skype 3rd party applications should do the same, because this situation can/will be encountered during normal Skype user use, and often.

The reason why SEHE does this, is, because the Skype client could be running, but not be logged in yet. So the Skype API is not available in these cases yet. Even in this case, if the Skype client was running, but not logged in, you would received a Attachment status of:

CODE
Attachment Status - Converted Status: Not Available - TAttachmentStatus: apiAttachNotAvailable


from SEHE, which tells me that your Skype client is not running or that Skype4COMLib does not know it is running or that you are not looking at this message.

So, if I had to guess, it seems like:

1. SEHE started the Skype client and the Skype client is waiting for a Skype user to logon.

or....

2. You unchecked the "Start Skype if needed checkbox on SEHE, and SEHE was started without Skype being started, even if this was/is the case, you should see a SEHE message, in the Skype4COM message window ("The top SEHE message window") that says:

CODE
*** Please Start Skype Now ***


So, I think this is situation 1 and not situation 2.

Once a Skype client is started and the current Skype client running is logged on. SEHE would receive an attachment status message of:

CODE
Attachment Status - Converted Status: API Available - TAttachmentStatus: apiAttachAvailable


SEHE would now know that it is ok to continue processing, that a Skype user is now logged into a Skype client, and another Attachment request would be sent ("Since the original authorization request in this case, went to a Skype client that may have been running, but had no Skype user logged in"). If a Pending Authorization Attachment status message is received by SEHE, SEHE sets a timer for 60 seconds, or if it is the first time that SEHE has run, it prompts the Skype user immediately that they will need to authorize SEHE.

This is needed also, for those cases where a user may "Accidentally" delete or change the authorization request for your 3rd party application from the Skype client, sometime after it was authorized. Also, if the same Windows User is using more than one Skype name, this is needed as well because we save information using Virtual Studio Project Settings on a Windows User basis to avoid any need for using the Windows registry for SEHE settings.

So, SEHE waits until there is a Skype user logged in, and SEHE can tell that is the case, based on the Attachment status message(s) received, which according to you has not happened.

What state is the Skype client in, in this case, logged in, running, not logged in, not started?

I have tested the example code, again, and found no issues with it on XP Home, XP Pro, Vista Home Premium systems, could you copy the SEHE windows text please, and provide it here?

Even if SEHE is started without any Skype client running it will function properly, once a Skype client is started and logged on, if SEHE was started with No Skype client running.

Please remember that there is NO user to authorize SEHE when the Skype client is running, but not logged on, so sending a MessageBox message for example to authorize SEHE, would serve no purpose, since all 3rd party applications are authorized on a "Skype Name" basis. A running but not logged on Skype client cannot authorize any 3rd application/program for any Skype user, since there is no way to determine, who the "Next" if any Skype user will be, that may or may not logon before the Skype client is stopped.

All possible combinations have been tested with SEHE and the Skype Windows clients, for authorization and attachment which includes Skype clients not running ("Including Skype not even being installed"), Skype clients being stoppped as well as re-started,while SEHE is running and Skype users logging off and logging on as different Skype users while SEHE is running.

Whatever nightmare 3rd party application to Skype client connect situation you could dream of creating, SEHE can be used to both test that situation as well as show you how to deal with and recover from that situation, you are welcome to see if you can find any situation, that SEHE cannot deal with. Minus deleting the Skype4COMLib .dll, I can't think of any situation where SEHE will fail and not recover.

However, in this case, it would seem, this is not one of them.

Reguarding the warning messages, this is the C# compiler trying to get any and all registry entries that may be needed for Skype4COMlib, which it will do when the Skype4COMLib .dll is isolated, as it is in this case, these registry entries are not present and this is normal, they are not required for normal use, but the C# compiler warns that they could not be found in case they were required.

As you can see SEHE shows you the proper actions when certian situations are encountered by your 3rd party application.

SEHE is not just a prototype tool, monitoring tool or a API command entry tool.

SEHE actually can be used to create situations, like the one you have and shows the best path of action, which all 3rd party programs/applications should also do to be as user friendly as possible. You can review the SEHE source code to see how and why these paths are taken.

Because you are able to create many copies of SEHE code using the C# Visual Studio Project Templates, you could create a copy of SEHE and modify or delete some of this code that handles a specific situation and see the result, instantly. You also can place your own breakpoints in SEHE to see what is going on, SEHE when run in debug, by default, uses a method I call "Auto-Debug" that will drop into debug automatically when in debug whenever SEHE encounters most exceptions, where they occur.

So it is also easy to say "Hey....I don't think this is the right thing to do in this case, so, I will change the code and see what happens when I do this my way!" so SEHE can be also used to quickly prototype with little code, since it is all there for you at project creation.

You could also say. What If this happened to my 3rd party application or program for Skype what would happen, use SEHE to create that situation, watch how it recovers and implement that same/similar logic in your code.

This is one reason a MessageBox is not used when SEHE is started and the Skype client is not running, yet a message is logged in the Skype4COM ("Top window") of SEHE:

CODE
*** Please Start Skype Now ***


This shows that SEHE is aware that no Skype client is running, to see this. one would neeed to uncheck the checkbox on SEHE for "Start Skype if needed", because SEHE will normally start the Skype client otherwise, if it is not already running.

Thanks for the thanks. I tried to design SEHE so that it can be many things to many people.

I am glad people see how useful it can be to cut time to prototype, design, code and test 3rd Party Skype Applications/Programs for both Skype4COMLib as well as API interfacing to the Skype Windows clients using SEHE.

I also hope people can see just how easy it is to prompt a user to download and install Skype, when Skype is NOT installed on the system in question, as well as deploy your 3rd party applications from web sites with automatic-updates.

These techniques which SEHE uses and demonstrates, makes your application one hundred percent user friendly to install, use and update.

Who knows, maybe SEHE will help people also learn C# as well, by exposing many C# methods in one program, including how to deal with so may things at once while using Windows Forms applications, the STA ("Single Threaded Apartment") model and C#.

SEHE also shows, there is really no need to use the MTA ("Multi-Threaded Apartment") model to interface to the API/Skype4COM, that it can be done using events and asyncronous methods instead and using Windows Forms Applications, which are STA based.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat Dec 20 2008, 10:11 · Reply · Quote and reply · Permalink · Top ·
Dynamo321
Regular member
Posts: 12

**


Thank you for the very thorough reply. After much poking at the source code, dlls and even the registry, I have found a resolution. Vista’s ridiculous UAC strikes again: Even if Visual Studio is running as an administrator in Vista, it is not possible for the VS application to communicate with Skype unless the UAC is completely disabled. At least that was my finding.

Your assumptions were quite correct I must add; fantastic debugging skills. I got caught on this line in the log prior to disabling my UAC:
12/20/2008 6:36:22 AM: Our Code - Skype Attachment Request Non-Waited Sent

I say a big thank you for spending the time it takes to help resolve this issue and I am sure this extensive tool will be highly valuable for many people. I appreciate your efforts in making this solution so effective.
Sat Dec 20 2008, 15:13 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


Thanks

Curious what version of Visual Studio are you using?

More here:

SEHE is set up to be a "ClickOnce" deployment application, created using Visual Studio C# 2008 Express (SP1) C# 3.0, .NET 3.5(SP1):

http://msdn.microsoft.com/en-us/library/bb384098.aspx

http://msdn.microsoft.com/en-us/library/aa983432.aspx

http://msdn.microsoft.com/en-us/library/ms165100.aspx

Depending on your version of Visual Studio, you may need to sign the "ClickOnce" Manifest.

Open your project, created by the SEHE C# project template from Visual Studio, do:

Project -> [Project Name] Properties -> Signing

Check the "Sign the "ClickOnce" manifest checkbox. You can click the "Create Test Certificate" button if needed to create a Certificate.

NOTE: The compiled versions of SEHE are signed by me using these methods, so this maybe why the multi-versions as well as the deployed versions are not having any trouble and your versions are. Currently, I do all my development on my XP systems, but I do have Vista systems as well.

Try building the project again, and running it, with the UAC enabled, does it work now?


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat Dec 20 2008, 15:35 · Reply · Quote and reply · Permalink · Top ·
Dynamo321
Regular member
Posts: 12

**


I am running Visual Studio 2008 Professional Edition Ver:9.0.21022.8 RTM C# .NET 3.5(SP1)

I have never used ClickOnce. When I create a certificate do I enter a specific password?
Sat Dec 20 2008, 15:59 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


No, pick whatever password you would like.

More about "ClickOnce" here: http://msdn.microsoft.com/en-us/library/wh45kb66.aspx


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat Dec 20 2008, 16:25 · Reply · Quote and reply · Permalink · Top ·
Dynamo321
Regular member
Posts: 12

**


Sorry for the delayed reply. Christmas travels got in the way.

I made the changes you had suggested and the communication between clients still hung at the same point. I am sure your Vista versions will exhibit the same behavior. For the time being we are continuing to develop with UAC turned off.

An aside question: Are you aware of any ways to raise events on incoming "SkypeIn" calls? I would like to take Caller ID information from incoming Skype “Land Line” calls and compare the information to phone numbers stored in my local database before the call is answered. Are you aware of such a solution? If not, Is the Skype team moving in this direction?
Fri Dec 26 2008, 23:48 · Reply · Quote and reply · Permalink · Top ·

TheUberOverlord
Advanced Member
Posts: 11,190

Group Icon


PartnerHandle is available when you get a incoming call. Not sure what you mean, since it is there now.

In fact SEHE shows the Caller Id/PartnerHandle on a inbound Online Number ("Formally SkypeIn") calls.

PartnerHandle = Caller Id when the call is inbound Online Number call.

Look at the CallStatus event handler in SEHE.

If you have an Online Number, run SEHE, call the Online Number, you will see SEHE show the PartnerHandle.

Example SEHE Message:

Call Status - Call Id: 47513 - Type Converted: Incoming Telephone Call - Type: cltIncomingPSTN - PartnerHandle: +16513784792 - TCallStatus - Converted Status: Calling - TCallStatus: clsRinging - Duration: 0 - Rate: 0 - Rate Currency: - Rate Precision: 0 - Conference Id: 0 - From Online Number: +16515551212

PartnerHandle: +16513784792 is the Caller Id of the caller in this case. On a inbound Skype to Skype call, PartnerHandle would be the callers Skype name.


--------------------
Get Free Software and Programming Tips and User Tricks For Skype
Now Monitor Your Subscription Usage In Real-Time!
Chat Language Translator For Skype - 43 Different Languages
How To Use Call Transfer With 4.x Skype Versions
52 Ways To Save NOW! With Skype Services
3rd Party Software Example for Skype - Includes ALL the source code
MyToGo For Skype - Use Skype services remotely from your phones
Save Skype Chat Messages To Text Files - Internet Explorer
Find Out If Someone Has Blocked You On Skype
Sat Dec 27 2008, 01:25 · Reply · Quote and reply · Permalink · Top ·
4 Pages 1 2 3 > » 
 
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

Welcome guest Read a quick guide to using these community forums.

  • My area
  • Sign in
  • Related
  • Search
  • Community guidelines
  • User guides
  • Knowledgebase

Heartbeat Heartbeat See how our products are performing on the Heartbeat blog.

About us · News · Jobs · Prices · Security · Site map
Privacy policy · Legal · © 2009 Skype Limited