This is the very first tutorial
for SocketPro.
- SocketPro
Installation program is simple.
- SocketPro
automatically set all 32bit dlls for you.
- It
doesn’t register 64bit COM dlls.
- It
doesn’t distribute 64bit server dlls into window system directory.
- We
need to manually register 64bit COM dlls and distribute 64bit server dlls
into window system directory.
- First
of all, create a directory x64 for storing all of 64bit dlls.
- Use
DOS command with administrator privilege to register three 64bit COM dlls.
- Register
64bit COM npUSocket.dll by regsvr32
npUSocket.dll.
- Register
64bit COM udb.dll by regsvr32
udb.dll.
- Register
64bit COM ufile.dll by regsvr32
ufile.dll.
- Copy
three 64bit dlls, usktpror.dll,
uodbsvr.dll and ufilesv into window system directories.
- Here
is a table listing all of important libraries.
|
|
Client side
|
Server Side
|
|
SocketPro core library
|
npUSocket.dll (COM)
|
usktpror.dll
|
|
Remote database service through MS OLEDB
|
udb.dll (COM)
|
uodbsvr.dll
|
|
|
|
|
|
SocketPro adapter for .NET
|
SProAdapter.dll
|
SProAdapter.dll
|
|
COM interop library for npUSocket.dll
|
usocketnet.dll
|
usocketnet.dll
|
|
COM interop library for udb.dll
|
udbnet.dll
|
udbnet.dll
|
|
|
|
|
|
Windows remote file management
|
UFile.dll (COM)
|
Ufilesvr.dll
|
- If
your development language is C++, you use the top two libraries only in
general.
- If
your development environment is .NET, usually you need to use the middle
three libraries. Also, you have to reference the libraries sproadpater.dll
and usocketnet.dll for both client and server projects.
- Very
occasionally, you may use our window remote file management service.
- Next,
put 32bit SocketPro .NET adapter into .NET global assembly cache by
executing gacutil.exe /i
Sproadapter.dll.
- Put
64bit SocketPro .NET adapter into .NET global assembly cache by executing gacutil.exe /i x64\Sproadapter.dll.
Doing so will simplify your .NET development.
- Start
remoteconnector, which is a 32bit window service and runs on the port
17001. Many of sample and tutorial applications will use it as a testing SocketPro
server.
- Start
visual studio 2005 and open csharp tutorial one solution.
- Note
both client and server reference SproAdapter (SocketPro adapter for .NET)
and usocketnet.dll (COM interoping library between .NET and native code
npUSocket.dll).
- Compile
csharp tutorial one with visual studio 2005 for both 64- and 32-bit
applications.
- Test
both client and server applications for both 32- and 64-bit versions.
- Start
visual studio 2010, open csharp tutorial one solution and convert 2005
solution into 2010 solution.
- Set
both client and server projects with target .NET runtime 4.0 for all of
platforms
- Open
file app.config for both client and server, and add useLegacyV2RuntimeActivationPolicy="true"
- Compile
csharp tutorial one solution with 2010.
- Test
both client and server applications for both 32- and 64-bit versions.
- Start ODBClient.exe
and connect it to remoteconnector with port 17001.
- Click
the buttons Connect and To Data Source.
- NWIND.mdb
is an access northwind database. For the simplicity, we use it for testing
database accessing from a 32bit SocketPro server application. Note you can
NOT access it from a 64bit server application because there is no 64bit
driver available. You can use MS Access to open the file and see what
tables the database contains.
- Execute
sql statement “select * from orders” by clicking the button Execute SQL
- Execute
sql statement “select * from orders, employees” by clicking the button
Execute SQL
Because we don’t see any problems
here, we are sure that all of libraries are running correctly. Therefore, we
are ready to move to the next tutorial now.