Click to See Complete Forum and Search --> : Custom AppWizard


Victor
October 15th, 1999, 12:59 PM
Sorry for the re-post, but I forgot to format code block...
I've generated a custom AppWizard for a database enabled Active Document Server / Full Container that works just fine (generates all necessary GUID's and Inplace technologies. The problem is that I also need to adjust the project settings (compiler and linker) and the macros defined by Microsoft do not work as advertized (imagine that) and there is no real documentation on this particular subject. MSDN is no help either.


This is what the code looks like right now.



void CDBFormViewAppAppWiz::CustomizeProject(IBuildProject* pProject)
{
/**/
CString
strROOT;

m_Dictionary.Lookup(_T("root"), strROOT);
strROOT.MakeUpper();

// vtt 10/12 - This would be the place to put additional code to generate project settings.
// But alas, Microsofts MACRO's don't work as advertised. They're in Visual Basic for one
// thing, and the documentation doesn't cover any Visual C++ equivalents.

CString
strDebugNew1 = _T("...Secret Debug Stuff..."),
strDebugNew2 = _T("...Secret Debug Stuff..."),
strDebugNew3 = _T("...Secret Debug Stuff..."),

strReleaseNew1 = _T("...Secret Release Stuff..."),
strReleaseNew2 = _T("...Secret Release Stuff..."),
strReleaseNew3 = _T("...Secret Release Stuff...");


IConfigurations
*pConfigs = NULL;
VARIANT
reserved;


pProject->get_Configurations(&pConfigs);
ASSERT(pConfigs);


CComPtr <IUnknown> pUnk;
CComQIPtr <IEnumVARIANT, &IID_IEnumVARIANT> pNewEnum;


if (SUCCEEDED(pConfigs->get_NewEnum(&pUnk)) && pUnk != NULL)
{
VARIANT
varConfig;


pNewEnum = pUnk;
CComQIPtr <IConfiguration, &IID_IConfiguration> pConfig;


while (pNewEnum->Next(1, &varConfig, NULL) == S_OK)
{
ASSERT(varConfig.vt == VT_DISPATCH);
pConfig = varConfig.pdispVal;
VariantClear(&varConfig);


CComBSTR
bstrName;


pConfig->get_Name(&bstrName);


BOOL
bDebug = (BOOL) _tcsstr(OLE2T(bstrNAme), _T("Debug"));
if (bDebug)
{
//Debug
pConfig->AddToolSettings("cl.exe", strDebugNew1, reserved);
pConfig->AddToolSettings("rc.exe", strDebugNew2, reserved);
pConfig->AddToolSettings("link.exe", strDebugNew3, reserved);
}
else
{
//Release
pConfig->AddToolSettings("cl.exe", strReleaseNew1, reserved);
pConfig->AddToolSettings("rc.exe", strReleaseNew2, reserved);
pConfig->AddToolSettings("link.exe", strReleaseNew3, reserved);
}
}
}
/**/
}




Any help would be most appreciated, even just ideas on where to look. Thank You in Advance...

...Victor...