Link to home
Start Free TrialLog in
Avatar of Dcom4CIT
Dcom4CIT

asked on

Best way to go about Win32 calls for Disk Mangament in a Java application (Similar to Rescan Disk in MyComputer->Manage->disk Management->Rescan Disks)

I'm totally new to Windows API calls, but I need to create a Java Application that is similar to the Rescan Disk operation in Windows, MyComputer->Manage, right click Disk Managment->Rescan Disks. So basically I need to write a Java Application that will pick up on newly Mapped and Masked storage without having to shutdown the Host PC. I was wondering could anyone tell me the best way to approach to this by answering the below questions:

1) How do I call Win32 calls within my Java Application?
2) What type of Win32 calls do I have to use?
SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why would you want to write this in Java?
Avatar of Dcom4CIT
Dcom4CIT

ASKER

Well I don't HAVE to do it in Java, but I'm more comfortable with Java. What language would you recommend? and why?
Java has no natural interface with the OS. You would be better with a platform-specific language - VBA, Visual C++?
I'm doing a project for my final year in College, its an Automated Storage Provisioning project. Basically when a host is deemed to require extra storage the application will configure and dynamically add EMC Symmetrix Storage to the Host in question. The Project is using EMC storage API, the version of the EMC Storage API I'm hoping to use is a Java version. After the application Maps, Masks (this will be done with EMC API) etc.. it should rescan the disks to pick up on the new storage(This will be Win32 calls).

At the moment i'm doing research to find the best way to go about it, so any ideas are greatly appreciated.
>>the version of the EMC Storage API I'm hoping to use is a Java version

Well i don't know this, but if it uses native code as well, that could be an argument for integrating your own native code into it with JNI
So your saying I should program the application in Java and use the Win32 calls using the JNI?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Why not do it in C# where the syntax is Java-like and the whole Windows API is at your disposal?
Does anyone know what Win32 calls I would need for this project?
best bet would be to ask in the windows programming ta.
Ok Thanks
8-)
good luck with it, let me know if you need further assistance :)