I'm trying to transform the LPSTR to contain the length at the start
the access violation is here:
func[nFuncs][i][0] = test;

I'm creating an xLL and don't know why i'm receiving the access violation

at the top I have
Code:
int numFuncs =4;
static LPSTR func[][9] = {
      {" descDataStore", " I", " descDataStore", " ", " 1", " MyCat", " ", " ", " "},
	  {" grpIFSEntity", " I", " grpIFSEntity", " ", " 1", " MyCat", " ", " ", " "},
	  {" enterIFSEntity", " I", " enterIFSEntity", " ", " 1", " MyCat", " ", " ", " "},
	  {" retData", " I", " retData", " ", " 1", " MyCat", " ", " ", " "},
      {0,0,0,0, 0, 0, 0}
      };
In the same cpp file (when called)

Code:
BOOL __stdcall xlAutoOpen(void) {
                 int i;
		 int j;
		 int nFuncs;
		 BYTE test;

		 // Prefix strengths with their length & count items
         // Note the framework's TempStr() function prefixes the
         // lengths anyway, but this is for other code that might
         // use the arrays
		 
        for(nFuncs=0;nFuncs<numFuncs; nFuncs++) {
            for(i=0; i<9; i++) {
				test = (BYTE) strlen(func[nFuncs][i]+1);
				func[nFuncs][i][0] = test;
             }
        }
}