MLLowLevelDeviceName (C Function)
MLLowLevelDeviceName has been replaced by WSLowLevelDeviceName.
int MLLowLevelDeviceName( MLINK l , const char ** name )
gets the low-level protocol form of the link name of the MathLink connection specified by l, storing the result in name.
Details
- MLLowLevelDeviceName() allocates memory for the name that must be released by calling MLReleaseLowLevelDeviceName(). If MLLowLevelDeviceName() returns an error, do not call MLReleaseLowLevelDeviceName() on the contents of name.
- MLLowLevelDeviceName() returns 1 on success and 0 on failure.
- MLLowLevelDeviceName() is declared in the MathLink header file mathlink.h.
Examples
Basic Examples (1)
#include "mathlink.h"
int main(int argc, char **argv)
{
MLENV env;
MLINK link;
int error;
const char *name;
int apiResult;
env = MLInitialize((MLEnvironmentParameter)0);
if(env == (MLENV)0)
{ /* Unable to create environment object */ }
link = MLOpenArgcArgv(env, argc, argv, &error);
if(link == (MLINK)0 || error != MLEOK)
{ /* Unable to create the link object */ }
MLActivate(link);
apiResult = MLLowLevelDeviceName(link, &name);
if(apiResult == 0)
{ /* Failed to retrieve low level name */ }
/* ... */
MLReleaseLowLevelDeviceName(link, name);
/* .... */
MLClose(link);
MLDeinitialize(env);
return 0;
}