# Matlab Interface to Generic Dlls

There are some limitations and restrictions that must be noted:

1) Currently, the MATLAB Interface to Shared Libraries is supported on Windows systems only. Windows shared library files have the file extension .dll.

2) Passing a void ** argument (that is, a pointer to a VOID pointer) to a function in a shared library is not supported in this release.

3) Passing a complex structure argument (that is, a structure constructed from other structures) to a shared library function is not supported in this release.

4) MATLAB does not currently support manipulation (e.g., addition, subtraction) of pointers returned by functions in a shared library.

help pdf檔的位置:
For more information on how to use MATLAB to load and call shared library functions, and for specifics on data conversion, consult the PDF documentation shipped with the files. It is automatically installed in the $MATLAB/toolbox/matlab/general directory (where$MATLAB is your root MATLAB directory). There are 3 documentation files: dll_interface_guide.pdf, dll_interface_reference.pdf, dll_interface_relnotes.pdf

Examples
This example calls functions from the libmx library to test the value stored in y:

hfile = [matlabroot '/extern/include/matrix.h'];

y = rand(4, 7, 2);

calllib('libmx', 'mxGetNumberOfElements', y)
ans =
56

calllib('libmx', 'mxGetClassID', y)
ans =
mxDOUBLE_CLASS