CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Join Date
    Jul 2003
    Location
    PA
    Posts
    124

    Re: string copy truncation

    Nice thought Ernst (), but this also fails to work. Truncates at exactly same place!!!!

    Code:
    _bstr_t sndSQL;
    sndSQL =  ::SysAllocString(L"updatemachineData_h 'RKR ','020',83300,105081,'01-00300-0350',
    'C400 CU BL 4928TW (VL)   ',
    7.987000,7.987000,7.900000,7968,749272,2.185000,100.000000,100.964066,
    1.439381,2.660000,'03000 '");

    What could be configured to PREVENT this from copying correctly? There must be soemthing preventing this from working.
    There are 10 types of people in the world, those that understand binary and those that don't.
    Using VS 2010

  2. #17
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: string copy truncation

    How are you verifing the data in the _bstr_t? By outputing it via code? Have you looked at in the memory window?

    If you are using the debugger to verify the contents of the string via the watch/quick watch windows then that is your problem. If that is the case what is your version of the IDE you are using? 6.0 [has issues with unicode strings being displayed].

  3. #18
    Join Date
    Jul 2003
    Location
    PA
    Posts
    124

    Re: string copy truncation

    actually, yes via the watch window!!! And yes, I am using version 6.

    let me dump it to a text file and see what that says...


    GAAAAK!!!
    The test log shows the entire string!!! It was the debug watch window AND the mouse over watch function that was truncating it.

    Wow, my bad!!!

    Thansk for all your help, sorry for the false alarm. I guess you learn something new everyday.
    Last edited by rick7423; March 22nd, 2005 at 02:56 PM.
    There are 10 types of people in the world, those that understand binary and those that don't.
    Using VS 2010

  4. #19
    Join Date
    Sep 2002
    Location
    Maryland - Fear The Turtle!
    Posts
    7,537

    Re: string copy truncation

    Quote Originally Posted by rick7423
    actually, yes via the watch window!!! And yes, I am using version 6.

    let me dump it to a text file and see what that says...


    GAAAAK!!!
    The test log shows the entire string!!! It was the debug watch window AND the mouse over watch function that was truncating it.

    Wow, my bad!!!

    Thansk for all your help, sorry for the false alarm. I guess you learn something new everyday.
    Yea. Well the limitation is more pronounced with UNICODE strings. I believe the display truncation length is around 252 or so.

    You can probably find visual studio add-ins for VC6.0 that will allow you to do quick-watches on longer strings via google.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured