How to pass char* arguments to DLL

13 views (last 30 days)
Olaf
Olaf on 17 Dec 2013
Hello,
I loaded a DLL into Matlab via "loadlibrary". There is a C function prototyp with a filepath like:
extern "C" int LoadFile (const char* path);
This function appears in my mfile like:
fcns.name{fcnNum}='LoadFile '; fcns.calltype{fcnNum}='cdecl'; fcns.LHS{fcnNum}='int32'; fcns.RHS{fcnNum}={'uint8Ptr'};fcnNum=fcnNum+1;
How can i create a valid pointer with the filepath?
I tried:
ptr = libpointer('uint8Ptr','a.xsn')
which leads to an error.
Any help would be great. Best regards.

Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!