How to get a String?

  • Follow


Hello you all,

Can anyone know how to get a string from a matlab C dll? I'm using
mxGetString(), but it's not working...

Thanks
0
Reply manuela.cotrim (39) 12/2/2009 2:10:34 PM

plim <manuela.cotrim@gmail.com> wrote in message <8820b767-224d-4447-8f18-b7b91c810eac@r24g2000yqd.googlegroups.com>...
> Hello you all,
> 
> Can anyone know how to get a string from a matlab C dll? I'm using
> mxGetString(), but it's not working...
> 
> Thanks

well...
WHAT - exactly - is not working(?)...

us
0
Reply us 12/2/2009 2:20:23 PM


     Hi.

a piece of my code

    mlfFoo(1, &y_ptr,&error_msg, data);

    y =3D mxGetPr(y_ptr);
    buflen =3D mxGetM(error_msg)*sizeof(mxChar)+1;	//LINE ERROR
    buf =3D (char*)mxMalloc(buflen);

    /* Copy the string data into buf. */
    status =3D mxGetString(error_msg, buf, buflen);

It displays the following in LINE ERROR:

"Unhandled exception at 0x7ad61df7 in test.exe: 0xC0000005: Access
violation reading location 0xcccccce4."

Thanks a lot


On Dec 2, 2:20=A0pm, "us " <u...@neurol.unizh.ch> wrote:
> plim <manuela.cot...@gmail.com> wrote in message <8820b767-224d-4447-8f18=
-b7b91c810...@r24g2000yqd.googlegroups.com>...
> > Hello you all,
>
> > Can anyone know how to get a string from a matlab C dll? I'm using
> > mxGetString(), but it's not working...
>
> > Thanks
>
> well...
> WHAT - exactly - is not working(?)...
>
> us

0
Reply plim 12/2/2009 3:25:50 PM

2 Replies
300 Views

(page loaded in 0.47 seconds)

Similiar Articles:













7/25/2012 8:49:06 PM


Reply: