本文整理汇总了C++中IApplication::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ IApplication::Release方法的具体用法?C++ IApplication::Release怎么用?C++ IApplication::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IApplication
的用法示例。
在下文中一共展示了IApplication::Release方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CustomizeProject
void CSDKAPWZAppWiz::CustomizeProject(IBuildProject* pProject)
{
// TODO: Add code here to customize the project. If you don't wish
// to customize project, you may remove this virtual override.
// This is called immediately after the default Debug and Release
// configurations have been created for each platform. You may customize
// existing configurations on this project by using the methods
// of IBuildProject and IConfiguration such as AddToolSettings,
// RemoveToolSettings, and AddCustomBuildStep. These are documented in
// the Developer Studio object model documentation.
// WARNING!! IBuildProject and all interfaces you can get from it are OLE
// COM interfaces. You must be careful to release all new interfaces
// you acquire. In accordance with the standard rules of COM, you must
// NOT release pProject, unless you explicitly AddRef it, since pProject
// is passed as an "in" parameter to this function. See the documentation
// on CCustomAppWiz::CustomizeProject for more information.
//The following sets the project settings for 'Addtional include directories:'
//maxsdk/include, maxsdk/lib and 'Output file name:' 3dsmax/plugin/*.*
CString sPath, pPath, ePath, sInc, sRC, sL, sG, pName, pExt;
IConfigurations *pConfigs;
long count;
IConfiguration *pConfig;
CString base_address;
// Generate a random 64K mutliple base address
int K64 = 64*1024;
base_address.Format(_T("0x%x"), ((rand() + rand() + ((rand()+(rand()<<16))))/K64)*K64);
lookup_key(_T("root"), pName);
lookup_key(_T("PLUGEXT"), pExt);
lookup_key(_T("SDKPATH"), sPath);
lookup_key(_T("PLGPATH"), pPath);
lookup_key(_T("EXEPATH"), ePath);
// pName.SetAt(0, toupper(pName[0]));
// 3dsmax.exe and maxsdk include paths
sInc = "/I" + sPath + "\\include ";
// Linker settings
sL =
//output filename
"/out:" + pPath + "\\" + pName + "." + pExt + " " +
//sdk libs
" comctl32.lib " + GetPluginLibs(pExt) +
//maxsdk libpath
" /LIBPATH:" + sPath + "\\lib " + " /DLL /base:" + base_address;
// General Settings
sG = CString("0"); //To specify Not Using MFC
BSTR bszComp = CString("cl.exe").AllocSysString();
BSTR bszLink = CString("link.exe").AllocSysString();
BSTR bszMfc = CString("mfc").AllocSysString();
// Compiler settings
BSTR bszSettingsC[] = {
("/MDd /G6 /LD " + sInc).AllocSysString(), // Debug
("/MD /G6 /LD " + sInc).AllocSysString(), // Hybrid
("/MD /G6 /LD " + sInc).AllocSysString() // Release
};
BSTR bszRemSettingsC = CString(_T("/GX /D_MBCS /GZ")).AllocSysString();
BSTR bszHyb = CString("Hybrid").AllocSysString();
BSTR bszSettingsL = sL.AllocSysString();
BSTR bszSettingsG = sG.AllocSysString();
COleVariant res;
pProject->AddConfiguration(bszHyb, res);
pProject->get_Configurations(&pConfigs);
pConfigs->get_Count(&count);
for (long i = 1; i <= count; i++)
{
COleVariant varInd(i);
pConfigs->Item(varInd , &pConfig);
COleVariant var(0L,VT_ERROR);
var.scode=DISP_E_PARAMNOTFOUND;
pConfig->AddToolSettings(bszMfc, bszSettingsG, var);
pConfig->AddToolSettings(bszLink, bszSettingsL, var);
COleVariant varStr;
pConfig->get_Name(&V_BSTR(&varStr));
varStr.vt = VT_BSTR;
if (varStr == COleVariant(pName + " - Win32 Debug"))
{
pConfig->AddToolSettings(bszComp, bszSettingsC[0], var);
SysFreeString(bszSettingsC[0]);
}
else if (varStr == COleVariant(pName + " - Win32 Hybrid"))
//.........这里部分代码省略.........