It is not smart to call MS function from Java code.Java runtime cannot work properly with MS environment. Better to use VB or VC, C#. Their runtime environment are same.