Unfortunately didn't get any answers on these boards but I have it more or less figured out. I'll post the code in case anyone has a similar problem in the future. It's separated into classes now so it looks a little different.
wrapper.h:
#include <ansi_c.h>
#include <labviewLib.h>
#include <iostream>
#include <stdlib.h>
#include "createMPTfile.h"
using namespace std;
class wrapper
{
public:
void run();
~wrapper(){delete create;}
private:
void LStrToCStr(LStrHandle lstr, char *cStrBuff, long buffLen);
TD1 tdptr;
TD1Hdl tdhdl;
};
wrapper.cpp:
#include "wrapper.h"
void wrapper::run()
{
tdhdl = NULL;
SetupWO();
getFileList(&tdhdl);
tdptr.dimSize = (*tdhdl)->dimSize;
for(int i = 0; i < tdptr.dimSize; i++)
{
tdptr.elt[i] = (*tdhdl)->elt[i];
char atpString[256];
LStrToCStr(tdptr.elt[i], atpString, 256);
printf(atpString);
printf("\n");
}
}
void wrapper::LStrToCStr(LStrHandle lstr, char* cStrBuff, long buffLen)
{
int32 len = LHStrLen(lstr);
if(len >= buffLen)
len = buffLen - 1;
memcpy(cStrBuff, LHStrBuf(lstr), len);
cStrBuff[len] = 0;
}