Windows CE and Windows XP Communication... 
Author Message
 Windows CE and Windows XP Communication...

Dear all,

I am currently working on a Wifi application connecting a Windows CE device
(client) and Windows XP (server)... (through ac-hoc network).

I am using Winsock's socket to do the communication. In my testing programs,
I simply send messages (the text within the edit box), and receive messages
within the two programs...

I have tried the client and server programs within the same device (Windows
CE), it works perfect. However, now I run the server on Windows XP, and
client on Windows CE.. they can still connect and send/receive messages, but
the messages received/sent appear to be strange...

1) from XP --> CE, it  appears like little square boxes...
2) from CE--> XP, the whole message is cut, only the first character left..

I guess it is about encoding problem... Can anyone suggest something to
solve the problem?
(p.s. suppose I will only use english on my programs ^.^)

Thanks all experts in advance for your help!!!

Albert Kuan
A CS student, working on FYP



Mon, 23 May 2005 10:54:34 GMT  
 Windows CE and Windows XP Communication...

    Are you sure you are sending Unicode or ASCII in both sides?
    The eVC uses Unicode in most API functions and controls,
    like TextBoxes, Dialogs, etc, the only exception I can think
    of are the socket functions, but VC, on the desktop, can use
    both, and if don't change it by yourself, it uses ASCII, so,
    before you send and after you receive the text, make sure
    that the format is the same on both sides.

    Regards,

    Wenderson Teixeira



Quote:
> Dear all,

> I am currently working on a Wifi application connecting a Windows CE
device
> (client) and Windows XP (server)... (through ac-hoc network).

> I am using Winsock's socket to do the communication. In my testing
programs,
> I simply send messages (the text within the edit box), and receive
messages
> within the two programs...

> I have tried the client and server programs within the same device
(Windows
> CE), it works perfect. However, now I run the server on Windows XP, and
> client on Windows CE.. they can still connect and send/receive messages,
but
> the messages received/sent appear to be strange...

> 1) from XP --> CE, it  appears like little square boxes...
> 2) from CE--> XP, the whole message is cut, only the first character
left..

> I guess it is about encoding problem... Can anyone suggest something to
> solve the problem?
> (p.s. suppose I will only use english on my programs ^.^)

> Thanks all experts in advance for your help!!!

> Albert Kuan
> A CS student, working on FYP



Mon, 23 May 2005 04:40:41 GMT  
 Windows CE and Windows XP Communication...
Refrain from using char types.
I use the TCHAR types on both desktop and remotes.
Works Fine

--
Cheers,
Kok Yeong
R & D Engineer
Scinetic Engineering (Singapore)
"Wenderson Teixeira" <wenderson em casadosprogramadores.com.br> wrote in

Quote:

>     Are you sure you are sending Unicode or ASCII in both sides?
>     The eVC uses Unicode in most API functions and controls,
>     like TextBoxes, Dialogs, etc, the only exception I can think
>     of are the socket functions, but VC, on the desktop, can use
>     both, and if don't change it by yourself, it uses ASCII, so,
>     before you send and after you receive the text, make sure
>     that the format is the same on both sides.

>     Regards,

>     Wenderson Teixeira



> > Dear all,

> > I am currently working on a Wifi application connecting a Windows CE
> device
> > (client) and Windows XP (server)... (through ac-hoc network).

> > I am using Winsock's socket to do the communication. In my testing
> programs,
> > I simply send messages (the text within the edit box), and receive
> messages
> > within the two programs...

> > I have tried the client and server programs within the same device
> (Windows
> > CE), it works perfect. However, now I run the server on Windows XP, and
> > client on Windows CE.. they can still connect and send/receive messages,
> but
> > the messages received/sent appear to be strange...

> > 1) from XP --> CE, it  appears like little square boxes...
> > 2) from CE--> XP, the whole message is cut, only the first character
> left..

> > I guess it is about encoding problem... Can anyone suggest something to
> > solve the problem?
> > (p.s. suppose I will only use english on my programs ^.^)

> > Thanks all experts in advance for your help!!!

> > Albert Kuan
> > A CS student, working on FYP



Mon, 23 May 2005 08:40:12 GMT  
 Windows CE and Windows XP Communication...


Quote:
> Refrain from using char types.
> I use the TCHAR types on both desktop and remotes.
> Works Fine

    In most cases, thats the best way, but when
    you are sending and receiving data from one
    platform to another, you MUST know what char
    type you are sending, because both sides must
    be compatible, there is no use to send a tchar
    from the desktop and receive a tchar in the
    pocket, if the desktop application is compiled
    as MBCS and the pocket is compiled as UNICODE.

    Regards,

    Wenderson Teixeira



Mon, 23 May 2005 23:10:52 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Windows CE, ATL, and Interprocess Communication

2. Q: Infrared Communication with Windows CE 3.0

3. Smart Pointers Crash in Windows 2000 but not in Windows XP

4. Visual C++ Runtime error in Windows XP, but not in Windows 2000

5. Windows Media Player control on Windows XP

6. How can I lock keyboard and mouse on Windows 9X and Windows NT/2000/XP

7. VC++ / MFC application runs on WinNT but crashes on Windows XP / Windows 2000

8. Minimized child windows loose size and position in Windows XP

9. Windows CE & /Windows directory

10. Ann: Live Chat on VenturCom Boot-NIC - Windows 2000/XP/XP Embedded Diskless Network Boot

11. Windows CE Online Chat - AMD & bSquare, Designing a High-Performance, Low-Power Windows CE .NET Device - May 15th 12:00 PST (20:00GMT)

12. Add-In to Provide Windows XP Theme - Help

 

 
Powered by phpBB® Forum Software