Re: URGENT: Unix/Windows Struct cast problem

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: cody (no_spam_deutronium_at_gmx.net)
Date: 07/29/04


Date: Thu, 29 Jul 2004 09:10:42 +0200

You have a field of type uint in your struct. Maybe it is 32bit on windows
but it is 64 on sun, that could be the problem.

--
cody
Freeware Tools, Games and Humour
http://www.deutronium.de.vu  || http://www.deutronium.tk
"Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> schrieb im Newsbeitrag
news:uv0iBrLdEHA.3944@tk2msftngp13.phx.gbl...
> Thank you for response.
> 1) The source server was Sun (not Linux)
> 2) no, the client is C# and I'm cast Object (created from Byte[]) to
struct
> 3) No problem, it works with Sun server, but I think does not with Windows
> server
>
> --
>         Tamir Khason
>  You want dot.NET? Just ask:
>  "Please, www.dotnet.us "
>
> "BMermuys" <someone@someone.com> wrote in message
> news:vPPNc.197203$d47.10114143@phobos.telenet-ops.be...
> > Hi,
> >
> > "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message
> > news:uuM5ffLdEHA.3572@TK2MSFTNGP10.phx.gbl...
> > > The problem is WHAT I'M passing in.
> > > I revieve the stream from C++ server.
> > > When it was in UNIX enviroment - everything worked ok, but once they
> > > treanfer to Windows the problem begun. There are same structures, but
as
> > far
> > > as I understand , not the same stream - thet's the single explanation
I
> > can
> > > think about...
> >
> > So, if you only see this problem when the server is on Windows and not
on
> > Linux, you can agree that the problem is with the server and not the
> client.
> >
> > Can't you post some code, how do you transmit this struct in c++, do you
> > cast the struct* to a byte* ?
> >
> > I still don't quite understand what the problem is you're having if
> > PtrToStruct works.
> >
> > HTH,
> > greetings
> >
> >
> > >
> > > --
> > >         Tamir Khason
> > >  You want dot.NET? Just ask:
> > >  "Please, www.dotnet.us "
> > >
> > > "cody" <no_spam_deutronium@gmx.net> wrote in message
> > > news:uEtZ649cEHA.3620@TK2MSFTNGP10.phx.gbl...
> > > > > Anyway there is no way to provide full source it a lot of classes
> with
> > > > > relations etc.
> > > > > The point is that there are diferences between unix and windows
TCP
> or
> > > > > binary stream....
> > > >
> > > >
> > > > I do not believe that. The bytes can be read from the stream the
same
> > way
> > > > you put them in.
> > > > The marshaller will take care that the byte order (big endian/little
> > > endian)
> > > > in your struct's variables will be ok.
> > > >
> > > > Remember that you have to pass the correct type to PtrToStruct,
> > otherwise
> > > > itt will output the wrong type.
> > > >
> > > > --
> > > > cody
> > > >
> > > > Freeware Tools, Games and Humour
> > > > http://www.deutronium.de.vu  || http://www.deutronium.tk
> > > >
> > > >
> > >
> > >
> >
> >
>
>


Relevant Pages

  • Re: Sketchy Apple Advertising
    ... >> This has served me well in avoiding Windows ... W2K Pro and XP Pro on the clients and Win Server ... with a small helping of SUN ... But no Macs. ...
    (comp.sys.mac.advocacy)
  • Re: Changing IP addresses.
    ... >I have a mixed network of Sun and Windows machines, ... >server and a Windows NT server. ...
    (comp.sys.sun.admin)
  • Changing IP addresses.
    ... I have a mixed network of Sun and Windows machines, ... server and a Windows NT server. ...
    (comp.sys.sun.admin)
  • Re: Exchange 2003 and a Linux box
    ... Check to make sure the Sun box's ... we ran a Windows Server 2003 Active Directory ... > to the Exchange server to get this to work. ...
    (microsoft.public.exchange.admin)
  • Re: How to sync Sun one Ldap user profile to windows 2003 AD
    ... any way to sync Sun one Ldap user profile to windows 2003 Acitve ... share point server 2003 is running on windows 2003 other server. ...
    (microsoft.public.win2000.active_directory)