Using MATLAB libstruct with DELPHI

3 views (last 30 days)
Marc
Marc on 6 Aug 2014
I am trying to use a DLL written originally in DELPHI Pascal that has had a C wrapper written to allow MATLAB to use the functions through loadlibrary and calllib. The functions that require integer inputs all work correctly but there is a function that requires the use of a libstruct to pass a string.
The MATLAB prototype file lists the expected input as a 'DelphiShortStringTagPtr' which is a a structure that looks like this:
struct DelphiShortStringTag {
unsigned char Length;
char Data[255];
};
typedef struct DelphiShortStringTag ShortStringType;
How would I define a libstruct to pass a string into this function call?

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!