Discussion:
Problem initializing Winsock in WinCE 6.0 R3 (error 10091)
(too old to reply)
patagoma
2010-05-13 11:01:01 UTC
Permalink
Hello

I am trying to implement a very simple Client/Server application in a
Windows CE 6.0 R3 image for de Device Emulator using native C++ in VS2005.

As I am quite new with C++ and WinCe 6.0, y started with the example given
in the msdn page for the socket connection with Winsock
(http://msdn.microsoft.com/en-us/library/ee493694(v=WinEmbedded.60).aspx )

I added to the OS image the Winsock Support catalog item (SYSGEN_WINSOCK),
and linked the ws2.lib to the Linker. I added the .lib in the project
properties->Linker->Additional Dependencies, and I also added the additional
library directory path where the .lib file is in my computer
(C:\WINCE600\PUBLIC\COMMON\OAK\LIB\ARMV4I\RETAIL in my case).

Then, after I build and run the project, I get the error code 10091 when the
WSAStartup(MAKEWORD(2,2), &wsaData) is executed.

The error means that the Network subsystem is unavailable, but I didn't find
any clear solution for this problem.

Is ther anything I missing or I am doing wrong? How can I make avaiable the
network subsystem in the emulator or in a device? Because I tried with one,
and I get the same error.


Thank you!
Luca Calligaris [eMVP]
2010-05-13 14:39:05 UTC
Permalink
it looks like ws2.dll is not really in your emulator image: you can check it
looking for ws2dll in ce.bib file (in your %_FLATRELEASEDIR) or, if you're
so not familiar look for it in the \windows folder of the emulator (check
that hidden/system files are visible)

If you do not find it: have you SYSGEN'ed the OS image after you included
winsock support?
--
Luca Calligaris (MVP-Windows Embedded)
***@eurotech.it.nospam
www.eurotech.it
Post by patagoma
Hello
I am trying to implement a very simple Client/Server application in a
Windows CE 6.0 R3 image for de Device Emulator using native C++ in VS2005.
As I am quite new with C++ and WinCe 6.0, y started with the example given
in the msdn page for the socket connection with Winsock
(http://msdn.microsoft.com/en-us/library/ee493694(v=WinEmbedded.60).aspx )
I added to the OS image the Winsock Support catalog item (SYSGEN_WINSOCK),
and linked the ws2.lib to the Linker. I added the .lib in the project
properties->Linker->Additional Dependencies, and I also added the additional
library directory path where the .lib file is in my computer
(C:\WINCE600\PUBLIC\COMMON\OAK\LIB\ARMV4I\RETAIL in my case).
Then, after I build and run the project, I get the error code 10091 when the
WSAStartup(MAKEWORD(2,2), &wsaData) is executed.
The error means that the Network subsystem is unavailable, but I didn't find
any clear solution for this problem.
Is ther anything I missing or I am doing wrong? How can I make avaiable the
network subsystem in the emulator or in a device? Because I tried with one,
and I get the same error.
Thank you!
patagoma
2010-05-14 17:29:01 UTC
Permalink
Thanks, but I already made those things, except the one of the ce.bib.
Just in case, I rechecked if in the \windows folder was the ws2.dll file
that it was, I SYSGENed the OS again having checked the winsock support
checbox,
and I comfirmed that the ws2.dll was in de ce.bib file, but I keep getting
the same error.
Post by Luca Calligaris [eMVP]
it looks like ws2.dll is not really in your emulator image: you can check it
looking for ws2dll in ce.bib file (in your %_FLATRELEASEDIR) or, if you're
so not familiar look for it in the \windows folder of the emulator (check
that hidden/system files are visible)
If you do not find it: have you SYSGEN'ed the OS image after you included
winsock support?
--
Luca Calligaris (MVP-Windows Embedded)
www.eurotech.it
Post by patagoma
Hello
I am trying to implement a very simple Client/Server application in a
Windows CE 6.0 R3 image for de Device Emulator using native C++ in VS2005.
As I am quite new with C++ and WinCe 6.0, y started with the example given
in the msdn page for the socket connection with Winsock
(http://msdn.microsoft.com/en-us/library/ee493694(v=WinEmbedded.60).aspx )
I added to the OS image the Winsock Support catalog item (SYSGEN_WINSOCK),
and linked the ws2.lib to the Linker. I added the .lib in the project
properties->Linker->Additional Dependencies, and I also added the additional
library directory path where the .lib file is in my computer
(C:\WINCE600\PUBLIC\COMMON\OAK\LIB\ARMV4I\RETAIL in my case).
Then, after I build and run the project, I get the error code 10091 when the
WSAStartup(MAKEWORD(2,2), &wsaData) is executed.
The error means that the Network subsystem is unavailable, but I didn't find
any clear solution for this problem.
Is ther anything I missing or I am doing wrong? How can I make avaiable the
network subsystem in the emulator or in a device? Because I tried with one,
and I get the same error.
Thank you!
.
Bruce Eitman [eMVP]
2010-05-15 12:59:47 UTC
Permalink
Do you have a network connection at all on your device?
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

Eurotech Inc.
www.Eurotech.com
Post by patagoma
Thanks, but I already made those things, except the one of the ce.bib.
Just in case, I rechecked if in the \windows folder was the ws2.dll file
that it was, I SYSGENed the OS again having checked the winsock support
checbox,
and I comfirmed that the ws2.dll was in de ce.bib file, but I keep getting
the same error.
Post by Luca Calligaris [eMVP]
it looks like ws2.dll is not really in your emulator image: you can check it
looking for ws2dll in ce.bib file (in your %_FLATRELEASEDIR) or, if you're
so not familiar look for it in the \windows folder of the emulator (check
that hidden/system files are visible)
If you do not find it: have you SYSGEN'ed the OS image after you included
winsock support?
--
Luca Calligaris (MVP-Windows Embedded)
www.eurotech.it
Post by patagoma
Hello
I am trying to implement a very simple Client/Server application in a
Windows CE 6.0 R3 image for de Device Emulator using native C++ in VS2005.
As I am quite new with C++ and WinCe 6.0, y started with the example given
in the msdn page for the socket connection with Winsock
(http://msdn.microsoft.com/en-us/library/ee493694(v=WinEmbedded.60).aspx )
I added to the OS image the Winsock Support catalog item
(SYSGEN_WINSOCK),
and linked the ws2.lib to the Linker. I added the .lib in the project
properties->Linker->Additional Dependencies, and I also added the additional
library directory path where the .lib file is in my computer
(C:\WINCE600\PUBLIC\COMMON\OAK\LIB\ARMV4I\RETAIL in my case).
Then, after I build and run the project, I get the error code 10091
when
the
WSAStartup(MAKEWORD(2,2), &wsaData) is executed.
The error means that the Network subsystem is unavailable, but I didn't find
any clear solution for this problem.
Is ther anything I missing or I am doing wrong? How can I make avaiable the
network subsystem in the emulator or in a device? Because I tried with one,
and I get the same error.
Thank you!
.
patagoma
2010-05-17 08:06:01 UTC
Permalink
I don't have the device right now to confirm it, but I am quite sure it has.
Because I can ping it from the pc, debug apps using the ethernet connection,
and access it through ftp. But what I don't really know if I can do it in the
oposite way (access from the device to the pc, or ping from the device to the
pc), or if the configuration is correct.
I will try this and confirm the network connection.

Thanks
Post by Bruce Eitman [eMVP]
Do you have a network connection at all on your device?
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
Eurotech Inc.
www.Eurotech.com
patagoma
2010-05-17 11:09:01 UTC
Permalink
I don't have the device avaiable right now to confirm it, but yes, I think it
has.
In the device emulator there is a network connection between the device and
the pc and looks like everything is ok (ping in both ways works all fine and
the pc shares the internet connection with the device)
I tryed with different port numbers, but I keep getting the error. Maybe I
miss something in the network configuration, but I don't know what can it be,
because as I said, everything else works fine.

Thanks
Post by Bruce Eitman [eMVP]
Do you have a network connection at all on your device?
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
Eurotech Inc.
www.Eurotech.com
patagoma
2010-05-18 06:29:01 UTC
Permalink
Problem solved.
It looks like the ws2.lib I was linking was not the correct one to link.
Doing a file search for the .lib I only found the one I linked. But it seems
that in order to make it work, you need to link the ws2.lib that is inside
the OS I created. For the device emulator the file is in the following path
C:\WINCE600\OSDesigns\OSName\OSName\Wince600\DeviceEmulator_ARMV4I\cesysgen\sdk\lib\ARMV4I\retail

Just for curiosity, in order to find the file, I had to go manually,
because, the automatic file searcher, didn't find it.

Thanks for all and sorry for the previous double posting
Post by patagoma
I don't have the device avaiable right now to confirm it, but yes, I think it
has.
In the device emulator there is a network connection between the device and
the pc and looks like everything is ok (ping in both ways works all fine and
the pc shares the internet connection with the device)
I tryed with different port numbers, but I keep getting the error. Maybe I
miss something in the network configuration, but I don't know what can it be,
because as I said, everything else works fine.
Thanks
Post by Bruce Eitman [eMVP]
Do you have a network connection at all on your device?
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman
Eurotech Inc.
www.Eurotech.com
Loading...