| MATLAB Central > MATLAB Newsreader > Cast calllib result to a struct pointer? |
|
|
|
Subject: Cast calllib result to a struct pointer? From: John Lyle Date: 14 Nov, 2009 06:59:05 Message: 1 of 7 |
|
I have a DLL function that returns a char* but I need to cast this to a struct*. Specifically I am trying to use the cvGetSeqElem() function from OpenCV (http://opencv.willowgarage.com/documentation/dynamic_structures.html#cvGetSeqElem) like this: |
|
Subject: Cast calllib result to a struct pointer? From: roger Date: 14 Nov, 2009 10:45:08 Message: 2 of 7 |
|
On Nov 14, 7:59 am, "John Lyle" <mathwo...@myallit.com> wrote: |
|
Subject: Cast calllib result to a struct pointer? From: John Lyle Date: 15 Nov, 2009 04:34:01 Message: 3 of 7 |
|
Yes I am, is that not possible? I'm trying to use the OpenCV DLLs directly in MATLAB without writing any C++ wrapper code. |
|
Subject: Cast calllib result to a struct pointer? From: roger Date: 15 Nov, 2009 10:52:28 Message: 4 of 7 |
|
On Nov 15, 5:34 am, "John Lyle" <mathwo...@myallit.com> wrote: |
|
Subject: Cast calllib result to a struct pointer? From: John Lyle Date: 16 Nov, 2009 05:35:02 Message: 5 of 7 |
|
OK thanks for your help |
|
Subject: Cast calllib result to a struct pointer? From: Philip Borghesani Date: 16 Nov, 2009 14:39:44 Message: 6 of 7 |
|
The best way to do this is with one or more aliases to the function cvGetSeqElem. |
|
Subject: Cast calllib result to a struct pointer? From: John Lyle Date: 14 Dec, 2009 07:16:09 Message: 7 of 7 |
|
Thanks Philip, that's exactly what I was looking for, works perfectly |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| dll | John Lyle | 14 Nov, 2009 02:46:51 |
| libpointer | John Lyle | 14 Nov, 2009 02:46:36 |
| calllib | John Lyle | 14 Nov, 2009 02:46:25 |
| opencv | John Lyle | 14 Nov, 2009 02:46:17 |
Contact us at files@mathworks.com
