Parsing a fixed length string



I'm receiving a fixed length string with fixed length fields that I need to
break apart. Ideally I'd like to take the string and put it into a Structure
and then access the individual fields from there.

I tried converting the string to a byte array and then used a
Marshal.PtrToStructure to do the move but get a null reference exception in
mscorlib.dll. All the paramers look valid going into the call.

Any ideas how to fix the error or is there another way to do this?
.



Relevant Pages

  • Re: client-server work locally but client crashes if launched elsewhere.
    ... first fatal assumption is that a recv will give you all the bytes you asked for. ... You should not use the string datatype in MFC ... have to loop receiving some small number of bytes each time until you receive your ... and the size of packets sent ...
    (microsoft.public.vc.mfc)
  • Re: code works
    ... You have no idea if argvexists or if it points to a string. ... And here you invoke undefined behavior the same as in your original ... I am receiving a lot of good help here ... school for spelling and now have a serious problem remembering how to spell ...
    (comp.lang.c)
  • Re: Howto: Keep Filename of attachment?
    ... When receiving an Email and sending a file ... String) ... On the send port FILE adapter config set output file name to ... is this sample for FILE receive port and SMTP send port case? ...
    (microsoft.public.biztalk.general)
  • Re: "Unique factorization" for strings?
    ... of the other bits in the string. ... can be partially decoded without receiving the entire string, ... Now reverse the code words. ... but if you only have a prefix of the string -- and in ...
    (sci.math.research)
  • Re: Use of uninitialized value Error
    ... >> concatenation or string at uninittest.pl line 45. ... > To fix your code, you need to make sure all variables hold valid values ... Prev by Date: ...
    (comp.lang.perl.misc)

Loading