|
// (c) Microsoft Corporation
// modified by Martin M�ller
function OnFinish(selProj, selObj)
{
try
{
var strTarget = wizard.FindSymbol("ITEM_NAME");
var strClassName = strTarget.split(".");
var bValid = wizard.ValidateCLRIdentifier(strClassName[0]);
if (!bValid)
{
wizard.ReportError();
return VS_E_WIZARDBACKBUTTONPRESS;
}
var strProjectName = wizard.FindSymbol("PROJECT_NAME");
var strSafeProjectName = CreateSafeName(strProjectName);
wizard.AddSymbol("SAFE_PROJECT_NAME", strSafeProjectName);
SetTargetFullPath(selObj);
var strProjectPath = wizard.FindSymbol("TARGET_FULLPATH");
wizard.AddSymbol("CLASS_NAME", strClassName[0]);
wizard.AddSymbol("INTERFACE_NAME", "I"+strClassName[0]);
wizard.AddSymbol("EVENTS_NAME", "I"+strClassName[0]+"Events");
// GUIDS
var strRawGuid = wizard.CreateGuid();
wizard.AddSymbol("GUID_COCLASS", wizard.FormatGuid(strRawGuid, 0));
strRawGuid = wizard.CreateGuid();
wizard.AddSymbol("GUID_INTERFACE", wizard.FormatGuid(strRawGuid, 0));
strRawGuid = wizard.CreateGuid();
wizard.AddSymbol("GUID_EVENTS", wizard.FormatGuid(strRawGuid, 0));
var InfFile = CreateInfFile();
AddReferencesForClass(selProj);
AddFilesToCSharpProject(selObj, strProjectName, strProjectPath, InfFile, true);
// Alle Konfigurationen so festlegen, dass das Element f�r COM-Interop registriert wird
var configs = new Enumerator(selProj.ConfigurationManager);
for(;!configs.atEnd();configs.moveNext())
{
configs.item().Properties("RegisterForComInterop").Value = 1;
}
}
catch(e)
{
if( e.description.length > 0 )
SetErrorInfo(e);
return e.number;
}
finally
{
if( InfFile )
InfFile.Delete();
}
}
function SetFileProperties(oFileItem, strFileName)
{
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.