CString tpCompPath1 = GetGlobal("CustomComponent1"); CString tpCompPath2 = GetGlobal("CustomComponent137"); CString tpComp1		= GetGlobal("CustomComponent2"); CString tpComp2		= GetGlobal("CustomComponent23"); CString tpCompSize1	= GetGlobal("ComponentSize"); CString tpCompSize2	= GetGlobal("ModuleSize");
CString tpCompPath1 = GetGlobal("CustomComponentPath1"); CString tpCompPath2 = GetGlobal("CustomComponentPath2"); CString tpComp1		= GetGlobal("CustomComponentDesc1"); CString tpComp2		= GetGlobal("CustomComponentDesc2"); CString tpCompSize1	= GetGlobal("CustomComponentSize1"); CString tpCompSize2	= GetGlobal("CustomComponentSize2");
void AddThirdParty(){	CString tpCompPath1 = GetGlobal("CustomComponent1");	CString tpCompPath2 = GetGlobal("CustomComponent137");	CString tpComp1		= GetGlobal("CustomComponent2");	CString tpComp2		= GetGlobal("CustomComponent23");	CString tpCompSize1	= GetGlobal("ComponentSize");	CString tpCompSize2	= GetGlobal("ModuleSize");	CString componentName;	CString cName;	CString compSDesc	= "Description Short=";	CString compLDesc	= "Description Long=";	CString compArchive = "Archive=";	CString compISize	= "Install Size Archive=";	CString compAttrib	= "Attributes=SELECTED|LAUNCHAPP";	int archiveLen		= tpCompPath1.GetLength();	int findLen			= tpCompPath1.ReverseFind('\\');	CString Archive1	= tpCompPath1.Right(archiveLen - findLen -1);	archiveLen			= tpCompPath2.GetLength();	findLen				= tpCompPath2.ReverseFind('\\');	CString Archive2	= tpCompPath2.Right(archiveLen - findLen -1);	CString tempstr;	char *cBuffer1 = new char [MAX_SIZE];	char *p = cBuffer1;	strcpy(p,LPCTSTR(compSDesc + tpComp1));	tempstr = compSDesc + tpComp1;	p += (tempstr.GetLength() +1);	strcpy(p,LPCTSTR(compLDesc + tpComp1));	tempstr = compLDesc + tpComp1;	p += (tempstr.GetLength() +1);	strcpy(p,LPCTSTR(compArchive + Archive1));	tempstr = compArchive + Archive1;	p += (tempstr.GetLength() +1);	strcpy(p,LPCTSTR(compISize + tpCompSize1));	tempstr = compISize + tpCompSize1;	p += (tempstr.GetLength() +1);	strcpy(p,LPCTSTR(compAttrib));	p += (compAttrib.GetLength() +1);	*p = 0;	char *cBuffer2 = new char [MAX_SIZE];	char *q = cBuffer2;	strcpy(q,LPCTSTR(compSDesc + tpComp2));	tempstr = compSDesc + tpComp2;	q += (tempstr.GetLength() +1);	strcpy(q,LPCTSTR(compLDesc + tpComp2));	tempstr = compLDesc + tpComp2;	q += (tempstr.GetLength() +1);	strcpy(q,LPCTSTR(compArchive + Archive2));	tempstr = compArchive + Archive2;	q += (tempstr.GetLength() +1);	strcpy(q,LPCTSTR(compISize + tpCompSize2));	tempstr = compISize + tpCompSize2;	q += (tempstr.GetLength() +1);	strcpy(q,LPCTSTR(compAttrib));	q += (compAttrib.GetLength() +1);	*q = 0;/*	char cBuffer1[MAX_SIZE][MAX_SIZE]={LPCTSTR(compSDesc + tpComp1),LPCTSTR(compLDesc + tpComp1),					 LPCTSTR(compArchive + Archive1),LPCTSTR(compISize + tpCompSize1),					 LPCTSTR(compAttrib)};	char *cBuffer2[]={LPCTSTR(compSDesc + tpComp2),LPCTSTR(compLDesc + tpComp2),					 LPCTSTR(compArchive + Archive2),LPCTSTR(compISize + tpCompSize2),					 LPCTSTR(compAttrib)};*/		CString firstSix = tpCompPath1.Left(6);	if ((firstSix.CompareNoCase("Please") != 0) && !(tpCompPath1.IsEmpty()))	{		componentName.Format("C%d", (numComponents));		cName.Format("C%d", componentOrder);		componentOrder++;		WritePrivateProfileString("Setup Type0", cName, componentName, iniDstPath);		WritePrivateProfileString("Setup Type1", cName, componentName, iniDstPath);		WritePrivateProfileSection(componentName, cBuffer1, iniDstPath);		numComponents++;		CopyFile(tpCompPath1, xpiDstPath + "\\" + Archive1, FALSE);		DWORD e1 = GetLastError();	}	firstSix = tpCompPath2.Left(6);	if ((firstSix.CompareNoCase("Please") != 0) && !(tpCompPath2.IsEmpty()))	{		componentName.Format("C%d", (numComponents));		cName.Format("C%d", componentOrder);		WritePrivateProfileString("Setup Type0", cName, componentName, iniDstPath);		WritePrivateProfileString("Setup Type1", cName, componentName, iniDstPath);		WritePrivateProfileSection(componentName, cBuffer2, iniDstPath);		CopyFile(tpCompPath2, xpiDstPath + "\\" + Archive2, FALSE);		DWORD e2 = GetLastError();	}	delete [] cBuffer1;	delete [] cBuffer2;}