2.2.4.38.8 Project::AttachFile

Description

Attaches a file to the Project folder in Origin-C workspace. These files eventually gets saved with the project (.opj) file.

Syntax

BOOL AttachFile( LPCSTR lpcszPathaName )

Parameters

lpcszPathaName
[input]path of the file to be attached

Return

returns zero (FALSE) if failed to attach else non-zero

Examples

//Attaches a file to the Project folder in Origin-C workspace.
void Project_AttachFile_Ex1()
{
	string strFileNameArray = GetAppPath(true) + "OriginC\\System\\Array.h";
	if ( Project.AttachFile(strFileNameArray) )
		printf("You can see " + strFileNameArray + " is under Project folder!");
	else
		printf("Fail to attach file to project!");
	return;
}

Remark

See Also

Header to Include

origin.h