March 21, 2008
Microsoft SmartDevice Connectivity API
I recently found that applications using Microsoft's SmartDevice Connectivity API does not transfer well to other computers. I could not find anything on the web about these problems, so there is the reason for this article. I hope if someone else has a problem similar to mine, that this is useful.
There were a series of steps I had to take to get my desktop application which was written using the Smart Device Connectivity API (Also called CoreCon in some places) to run on another computer and communicate with the WIndows CE device I use.
First off, I had to register several Visual Studio 2008 SmartDevice assemblies into the Global Assembly Cache. To do this, there is a utility called "gacutil" which makes it a piece of cake.
I also ended up copying the "CoreCon" folder from two different places into the same location on the other computers. These locations are (for Windows XP) "C:\Program Files\Common Files\Microsoft Shared\corecon" and "C:\Documents and Settings\All Users\Application Data\Microsoft\CoreCon". I then needed to register the DLL's in the common files path using regsvr32.
After that was done, I was getting another strange error (a 32-bit hex error code which corresponded to some generic COM error) when I tried to connect. I traced these down to not having other required DLL's. To overcome this, I had to install the .NET 2.0 SDK (about a 350 MB setup file). I'm sure that there is a better way to get the necessary files, but everything I read said you had to have Visual Studio 2008 installed, and that was not an option for the other computers I wanted to use this application.
At this point I thought for sure it would work. I was now getting an error about versions. Out of curiousity, I compared both CoreCon folders mentioned earlier with the corresponding one on my computer (using WinMerge, a great open source compare utility on SourceForge). I found that the assemblies on the other computer were older than mine (because I was using .NET 3.5 and I installed the 2.0 SDK on the other machine because I could not find an SDK for 3.5, and just the framework didn't put on the required files, although I did have to install that as well). Anyway, I updated the files with the copy on my computer, and suddenly it all worked.
What a mess of stuff to get an application running on another computer. Of course this took me about a half a day to solve because Microsoft does not have any documentation anywhere on this even being an issue.
I know I don't have a lot of detail in this blurb, but hopefully it at least gives someone enough general direction to save them from spending the time I had to in order to get this working.
TrackBack
TrackBack URL for this entry:
http://www.pipesnetwork.com/cgi-bin/MT/mt-tb.cgi/934



Comments
Thanks dude....you just made my Easter. I didn't have to waste my whole day figuring this one out..haha.
Later,
Dut
Posted by: dut | March 23, 2008 11:12 AM