Possibly a problem with WMCommandProc function in the InstallOptions DLL. This is the current function. A possible crash exists as nIdx is not checked for a value < 0 before it is used which would result in an invalid array index.
LRESULT WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) {
switch (codeNotify) {
case BN_CLICKED:
{
int nIdx = FindControlIdx(id);
if (pFields[nIdx].nType == FIELD_BROWSEBUTTON) {
int nParentIdx = pFields[nIdx].nParentIdx;
switch(pFields[nParentIdx].nType) {
case FIELD_FILEREQUEST:
BrowseForFile(nParentIdx);
break;
case FIELD_DIRREQUEST:
BrowseForFolder(nParentIdx);
break;
}
break;
} else if (pFields[nIdx].nType == FIELD_LINK) {
ShellExecute(hMainWindow, NULL, pFields[nIdx].pszState, NULL, NULL, SW_SHOWDEFAULT);
}
}
break;
}
return 0;
}
The modified version with the array bounds check,
LRESULT WMCommandProc(HWND hWnd, UINT id, HWND hwndCtl, UINT codeNotify) {
switch (codeNotify) {
case BN_CLICKED:
{
int nIdx = FindControlIdx(id);
// I only added the next two lines for some error
// checking
if (nIdx < 0)
break;
if (pFields[nIdx].nType == FIELD_BROWSEBUTTON) {
int nParentIdx = pFields[nIdx].nParentIdx;
switch(pFields[nParentIdx].nType) {
case FIELD_FILEREQUEST:
BrowseForFile(nParentIdx);
break;
case FIELD_DIRREQUEST:
BrowseForFolder(nParentIdx);
break;
}
break;
} else if (pFields[nIdx].nType == FIELD_LINK) {
ShellExecute(hMainWindow, NULL, pFields[nIdx].pszState, NULL, NULL, SW_SHOWDEFAULT);
}
}
break;
}
return 0;
}
End result, everything is super. I do wonder why I was getting an array index less than 0 but I was.