J
JT
Hi,
I've realized that my good fortune of not having my computer go into
standby mode was the result of my application accessing a file on a
shared network drive. Not going into standby is a very good thing for
my application, but I don't want users to be required to share a drive
and file just to accomplish this.
I've read in old posts in various places stating that by importing
kernel32.dll I could access a function called
SetThreadExecutionState(...) with a value of ES_SYSTEM_REQUIRED,
potentially ORed with ES_CONTINUOUS (or the equivalent DWORD values),
would accomplish what I need. I'm guessing this is not managed code
and would have to be marshalled in and used as unsafe code (please
forgive me for not knowing anything about marshalling or unmanaged
code).
Is there a managed code way to accomplish this? Does anyone have any
suggestions?
Thanks,
JT
I've realized that my good fortune of not having my computer go into
standby mode was the result of my application accessing a file on a
shared network drive. Not going into standby is a very good thing for
my application, but I don't want users to be required to share a drive
and file just to accomplish this.
I've read in old posts in various places stating that by importing
kernel32.dll I could access a function called
SetThreadExecutionState(...) with a value of ES_SYSTEM_REQUIRED,
potentially ORed with ES_CONTINUOUS (or the equivalent DWORD values),
would accomplish what I need. I'm guessing this is not managed code
and would have to be marshalled in and used as unsafe code (please
forgive me for not knowing anything about marshalling or unmanaged
code).
Is there a managed code way to accomplish this? Does anyone have any
suggestions?
Thanks,
JT