Have an application that loops through a directory holding several MPG movies that I want to convert to WMF files. It works but when it spawns the encoder, the method I wrote needs to wait until the encoder completes, otherwise it will convert only a few KB’s and stop. I tried usingthe following to hold the process until it completes:
Do While Encoder.RunState = WMENC_ENCODER_STATE.WMENC_ENCODER_RUNNING
If Encoder.RunState WMENC_ENCODER_RUNNING Then
Debug.Print Encoder.RunState
MsgBox “Done”
End If
Loop
ConvertFile = True
What ends up happening is that it will stay hung in that loop until I do a break or something, when I restart it it will start processing the next. If I look at the files in the directory it is converting to I see the file names changing but at a certain point it just hangs (I think), yet still taking up 100% of my CPU.