Partilhar via


Abrindo vários arquivos AVI

[O recurso associado a esta página, MCI, é um recurso legado. Foi substituído por MediaPlayer. MediaPlayer foi otimizado para Windows 10 e Windows 11. A Microsoft recomenda vivamente que o novo código utilize MediaPlayer em vez de MCI, sempre que possível. A Microsoft sugere que o código existente que usa as APIs herdadas seja reescrito para usar as novas APIs, se possível.]

Se o seu aplicativo abrir vários arquivos, ele deve incluir rotinas como as seguintes funções simples. O aplicativo usaria a função "initAVI" durante sua inicialização e a função "termAVI" durante seu encerramento. Essas funções simplesmente envolvem a função mciSendString.

// Initialize the MCIAVI driver. This returns TRUE if OK, 
// FALSE on error. 
 
BOOL initAVI(VOID) 
{ 
    // Perform additional initialization before loading first file. 
    return mciSendString("open digitalvideo", NULL, 0, NULL) == 0; 
} 
 
// Close the MCIAVI driver. 
void termAVI(VOID) 
{ 
    mciSendString("close digitalvideo", NULL, 0, NULL); 
}