SP2 Dismounting Volumes in a Hibernate Once/Resume Many Configurat

G

Guest

If tried to write a programm as discribed in the following technical article
http://msdn.microsoft.com/embedded/...mesInHibernateOnceResumeManyConfiguration.asp

But some things are not so clear:

If done the following as discribed in the article.
I've done Point 1 and 2 auf the artikel. (Lock,Dismount)
All DeviceIoControlfunctions returns with an OK state.
Then i want to see whats happen with the unprotected partition.
In my opinion, with the exporer it should not possible to access to the
dismounted partiton, but ist was possible, strange?
Is this behavior normal?

But part what make the most problem is point 5:
To allow the system to rediscover the volume, it first must be unlocked. Use
the DeviceIoControl function with the dwIoControlCode parameter
FS_UNLOCK_VOLUME. This unlocks the volume.
The volume must be unlocked immediately after the system boots.

How is this to understand?
Where is Point to start this, or how do i know that i boot from an
hibernatefile?
Is there any entry point?

If i try to unlock the volume manually after boot from the hibernate state,
i've got a FAIL from the DeviceIoControl.

Anyone here has successfully written a programm, what has done this as
described in the artice?

On the other side, should Microsoft not support us with a Programm what do
exactly this like this an advanced XPEPM.exe?
1. Detect all not writeprotected partitions
2. ock and dismount them
3. create the hibernate file
4. after boot from the hibernatefile unlock the partitons again.

Regards
gerros








Openb
Lock ismount the
 
K

KM

gerros,
If tried to write a programm as discribed in the following technical article:
http://msdn.microsoft.com/embedded/...mesInHibernateOnceResumeManyConfiguration.asp

But some things are not so clear:

If done the following as discribed in the article.
I've done Point 1 and 2 auf the artikel. (Lock,Dismount)
All DeviceIoControlfunctions returns with an OK state.
Then i want to see whats happen with the unprotected partition.
In my opinion, with the exporer it should not possible to access to the
dismounted partiton, but ist was possible, strange?
Is this behavior normal?

Don't do that. Accessing the drive from Explorer you mount it back.
But part what make the most problem is point 5:
To allow the system to rediscover the volume, it first must be unlocked. Use
the DeviceIoControl function with the dwIoControlCode parameter
FS_UNLOCK_VOLUME. This unlocks the volume.
The volume must be unlocked immediately after the system boots.

How is this to understand?
Where is Point to start this, or how do i know that i boot from an
hibernatefile?
Is there any entry point?

In your application you do something like:
- Lock (your app code)
- Dismount (your app code)
- Hibernate (your app code)
........ machine in hibernate state ....
...... Resume ..........
- Unlock (your app code)

Does this make more sense?
If i try to unlock the volume manually after boot from the hibernate state,
i've got a FAIL from the DeviceIoControl.

Anyone here has successfully written a programm, what has done this as
described in the artice?

Search Google archive. There have been a thread between me and Slobodan where we both did similar programs.
On the other side, should Microsoft not support us with a Programm what do
exactly this like this an advanced XPEPM.exe?

Send your feedback to Microsoft directly: http://msdn.microsoft.com/embedded/community/community/feedback/feedxp/default.aspx
1. Detect all not writeprotected partitions
2. ock and dismount them
3. create the hibernate file
4. after boot from the hibernatefile unlock the partitons again.

You may not be able to lock and dismount a drive if some apps/drivers are suing some files on it.
This is on of the reasons why this cannot be implemented in general case.
But if you, as the platform designer, make sure no files are open on the volume to be dismounted you will be fine with HORM.

KM
 
S

Slobodan Brcin \(eMVP\)

Hi Geros,

http://groups-beta.google.com/group...95f3938308b/dd4e492f8e2a65c3#dd4e492f8e2a65c3
All DeviceIoControlfunctions returns with an OK state.
Then i want to see whats happen with the unprotected partition.
In my opinion, with the exporer it should not possible to access to the
dismounted partiton, but ist was possible, strange?
Is this behavior normal?

Only if your application terminated or unlocked volume.

Use following:
1. Detect all not writeprotected partitions
2. lock and dismount them
3. create the hibernate file
4. after boot from the hibernatefile end your application and it will unlock all volumes by default.

Regards,
Slobodan
 
G

Guest

KM and Slobodan thanks for your answers!
It works now for me!
To detecting all not writeprotected partitons is not so easy.
So i choose the option of a command line argument.

Im not 100% sure, but i think its only necessary to unlock dismount fixed
partitions?
Removable Devices seems to work without unlock.

Nevertheless in my opinion this program should from MS.

Regards gerros

Regards gerros.
 
S

Slobodan Brcin \(eMVP\)

Hi Gerros,

Usually you will RAM EWF protect only OS volume which is usually C: and with that assumption all non C: volume FS should be
dismounted.
Im not 100% sure, but i think its only necessary to unlock dismount fixed
partitions?
Removable Devices seems to work without unlock.

Don't relly on this, since you might encounter problems with data consistency later on which will be hard to spot.
Nevertheless in my opinion this program should from MS.
Feel free to tell them that:
http://msdn.microsoft.com/embedded/community/community/feedback/feedxp/default.aspx

Regards,
Slobodan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top