|Get started with SocketPro
-- A unique framework implemented with
asynchrony and parallel computation with many advanced features|
We have prepared a set of video tutorials to help you quickly get started with SocketPro. Most of video tutorials come with sample projects and simple code for your study.
2. Requirements for client and server
First of all, make sure that MS dotNet framework version 4 or later is installed at both client and server machines because many client and server samples are written using .NET. Note that SocketPro still supports old MS dotNet framework versions 2.0, 3.0 and 3.5 although these samples are default to .NET 4.0 and Visual Studio 2010. The installer still distributes SocketPro adapter for old versions .NET (SocketProAdapter_For_Net_20_35.zip).
3. Setups for SocketProAdapter
Native development: If your development language is C/C++, make sure that your development environment includes the directory C:\Program Files\UDAParts\SocketPro\include. At this time, you can use VC++ 6 and Borland C++ builder 5 or later to develop your C/C++ applications. You may need to add the source file C:\Program Files\UDAParts\SocketPro\include\sprowrap.cpp into your project for use of SocketProAdapter.
.NET development: If your development is based on .NET environment, you are required to add both C:\Program Files\UDAParts\SocketPro\bin\SocketProAdapter (SProAdapter.dll) and usocketnet.dll into your client and server projects.
4. Play with video and text tutorials at beginning
At this time, SocketPro package comes with a set of tutorial projects for C++, C# and VB.NET. These tutorials come with detailed step-by-step guides for you to get started with SocketPro quickly. Of course, these video tutorials are useful to you too. After you are used to these tutorials, please go to here for a set of SocketPro advanced features. Please DO NOT directly jump into these advanced features.
5. Manually set sample server RemoteConnector for the worst cases
After installation, you are not expected to set the sample window NT service under most cases. In case there is something wrong, you can manually set the sample service RemoteConnector.
Inside the directory of C:\Program Files\UDAParts\SocketPro\bin\, you will find one server named as RemoteConnector.exe, which is served as a sample server for many other samples. The server is a window NT service. you can manually install it by executing the following command from DOS command at the directory C:\Program Files\UDAParts\SocketPro\bin:
remoteconnector /install (or uninstall for de-install)
For the sake of security, SocketPro installer program doesn't automatically configure remote window file service for you. However, you can configure it by yourself as below.
First, go to registry HKEY_LOCAL_MACHINE\SOFTWARE\(Wow6432Node\)UDAParts\SocketPro\REMOTECONNECTOR\PlugIns\ with the tool regedit.exe and administrator right, and create a new sub key Module3. Under the key Module3, create one string value (Location) and set its value to ufilesvr.dll. Also, create a DWORD value (Param), and set it to 0. After restarting it, RemoteConnector will dynamically load the library and process all of win32 file management requests as shown in the following Figure.
RemoteConnector also comes with a simple MS Access database file containing data such as user ID, password, service ID and granted services for each of user. It is easy for you to understand that RemoteConnector use the database to control accessing from different clients with credentials. Open the database file and see what it has.
RemoteConnector comes with the C++ source code. See it inside the directory C:\Program Files\UDAParts\SocketPro\samples\others\server\RemoteConnector\.
6. Manually register COM DLLs and .NET SocketPro adapter for the worst cases
After installation, you are NOT expected to manually register COM DLLs or set SocketPro .NET adapter at all. SocketPro installer will automatically register these COM DLLs and install 64bit .NET adapter into Global Assembly Cache (GAC) for your easy development. In case there is something wrong under worst cases, you can manually set them with the following steps.
Register COM DLLs for both x86 and x64 versions. Use your DOS command and navigate to the directory C:\Program Files\UDAParts\SocketPro\bin\. Execute the following commands for registering x86 version of COM DLLs.
Similarly, execute the following commands for registering x64 version of COM DLLs
Note that you can register and run BOTH 32bit and 64bit versions of COM DLLs at the SAME time within the SAME machine without any problem at all.
Note that npUSocket.dll, UDB.dll and UFILE.dll are SocketPro client core library, client remote database access library with use of MS OLEDB technology and client window file management, respectively.
To simplify your .NET development, you can install both x86 and x64 versions of SProAdapter.dll into .NET global assembly cache (GAC) by use of .NET utility tool gacutil.exe. Optionally, you can also put .NET COM interop libraries usocketnet.dll and udbnet.dll into GAC with the tool.
In case your application is not able to load the file SProAdapter.dll, you may need to install Microsoft visual C++ 2010 redistributable file SP1 (x64) or Microsoft visual C++ 2010 redistributable file SP1 (x86).
7. Server libraries
SocketPro installer automatically distribute server libraries onto window system directories (C:\Windows\System32 and SysWOW64) for each of both 32-bit and 64-bit platforms. They are usktpror.dll, uodbsvr.dll and ufilesvr.dll, which are SocketPro server core library, remote database server access library with use of MS OLEDB technology, and window file server management library, respectively.
8. USocket.dll registration on devices
You can download the visual registration tool here (regsvr.zip) to register USocket.dll on devices. The tool is originally listed at the site http://windowsmobiledn.com/how-can-i-register-com-dll-on-pocket-pc/
The SocketPro package contains a few traditional VB6 samples. If you are using VB.Net, you can simply use Visual studio.net tool to convert them into VB.net code samples.
Without registration, a SocketPro server or client will prompt a message to ask you for registering SocketPro. If so, simply click the message box and the SocketPro server will continue to run. After registering SocketPro by getting a proper key to unlock it, the message box will never appear again no matter how many socket sessions are established after restarting both client and server applications.