void FlashPlayerPlugin::build(NSIS *installer, Version version)
{
    Q_UNUSED(version);

    isError = false;
    download();
    if (!isError) {
        QStringList blockingProcesses(browsers());
        blockingProcesses.removeAll("chrome.exe");
        isError = !installer->build(
                    objectName(),
                    getOutputFile(),
                    NSIS::Zlib,
                    40,
                    blockingProcesses,
                    tempFiles,
                    loadResource(":NSIS/FlashPlayerPlugin/main.nsh")
                    );
    }
    cleanup();
}
Пример #2
0
int __declspec(dllexport) Lab4b() {
	char * line = (char *) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, 100), * linep = line;
    size_t lenmax = 100, len = lenmax;
    char* linen = NULL;
    char c;

    if(line == NULL)
        return -1;

	fprintf(stdout, "Enter your name: ");
    while(1) {
        c = (char)fgetc(stdin);
        if(c == '\n')
            break;

        if(--len == 0) {
            len = lenmax;
            linen = (char *) HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, linep, lenmax *= 2);

            if(linen == NULL) {
                HeapFree(GetProcessHeap(), 0, linep);
                return -1;
            }
            line = linen + (line - linep);
            linep = linen;
        }

        if((*line++ = c) == '\n')
            break;
    }
    *line = '\0';
	
	fprintf(stdout, "%s is not my name.", linep);
	
    return browsers();
}