Hi,
Thank for your advise and example.
In my case, I don't had any launcher.
My dbf files will be in the server or a share PC,
other user might be opening the dbf file in another PC, so I had
no idea which program they are using.
Therefore, I not sure whether there is any API to check
and force all user except myself to exit their program
so that I can proceed to open the file exclusively.
>Hi Virusim:
>
>If you are using a "Launcher" application to start your programs.....
>You COULD command the "Launcher" to find and close a application.
>(you do need to know the application name)
>
>Use the APIs
>
>Find the Application handle:
>lnHWnd = FindWindow(0, @ProgName)
>
>Force An Application To Close:
>=SendMessage(lnHWnd,0X10,0,0)
>
>HTH
>
>Mal
>
>>Hi,
>>
>>In order to index/reindex a dbf file, we must open that
>>dbf file exclusively.
>>
>>However, in some case, the file to index/reindex is open by
>>other, therefore, is any Win32API to force the other party
>>to close the file that we want to index/reindex so that
>>we can proceed to index/reindex that file.
>>
>>Any example is appreciated. Thank you
Best Regards
Virusim