Click here to Skip to main content
15,899,126 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questioncontrast and sharpness change of image Pin
Mortezai27-Jun-07 7:44
Mortezai27-Jun-07 7:44 
AnswerRe: contrast and sharpness change of image Pin
Dave Kreskowiak27-Jun-07 7:57
mveDave Kreskowiak27-Jun-07 7:57 
AnswerRe: contrast and sharpness change of image Pin
Christian Graus27-Jun-07 10:49
protectorChristian Graus27-Jun-07 10:49 
Questiondata binding update data source Pin
Mortezai27-Jun-07 6:49
Mortezai27-Jun-07 6:49 
AnswerRe: data binding update data source Pin
Dave Kreskowiak27-Jun-07 7:13
mveDave Kreskowiak27-Jun-07 7:13 
GeneralRe: data binding update data source Pin
Mortezai27-Jun-07 9:22
Mortezai27-Jun-07 9:22 
GeneralRe: data binding update data source Pin
Dave Kreskowiak27-Jun-07 9:40
mveDave Kreskowiak27-Jun-07 9:40 
QuestionWhich API do I call to abort logoff/shutdown Pin
kbern327-Jun-07 5:43
kbern327-Jun-07 5:43 
I need to write a script that will run every time someone tries to log off or shutdown a computer. In the past people have logged off computers while QE testing or automation on virtual machines were running. So it would always be a real pain when these VMs were shut off without warning. I need to write a script that would check for VMware’s executable file (vmware-vmx.exe) and (if the process is found) prompt a warning to the user and stop them from shutting down or logging off.

I’ve done A LOT of research on the internet about logoff/shutdown scripts, posted on message boards and I’ve emailed people that I know. However, I haven't been able to find any examples. I’ve found three different API calls/messages and I really don’t know which one I should use. I can’t move forward with my scripts until I do:

AbortSystemShutdown - This call aborts a shutdown initiated by InitiateSystemSutdown or InitiateSystemShutdownEx calls. ASS is thrown during the timeout period specified by ISS or ISSE. I don’t know if it will work for the console session since ISS and ISSE are only used in RDP connections.

ExitWindowsEx - Can shutdown, logoff, or restart a computer and pass reasons to the event log as to why any of these happened. I havn't found an API that aborts this call. I know that EWE sends the WM_QUERYENDSESSION message which can potentially abort a logoff/shutdown if the a value of “0” is returned. How do I respond to this message with “0”? I haven’t found any examples.

SystemEvents.SessionEnding - Can cancel shutdown
My qualms: can’t cancel logoff and too many caveats: console apps don’t raise this event, cancel only works sometimes, and there’s no guarantee this event will fire before the closing event fires.

I would really appreciate some help and feedback.

P.S. Just in case your wondering, I’m aware of the fact that I can’t directly call an API from a script and that I have to use either MS Office as proxy to load the code into a macro to make the calls or use an ActiveX control to act as a wrapper to make the calls
AnswerRe: Which API do I call to abort logoff/shutdown Pin
Craster27-Jun-07 5:58
Craster27-Jun-07 5:58 
AnswerRe: Which API do I call to abort logoff/shutdown Pin
Psycho-*Coder*-Extreme27-Jun-07 17:54
Psycho-*Coder*-Extreme27-Jun-07 17:54 
QuestionRe: Which API do I call to abort logoff/shutdown Pin
kbern328-Jun-07 3:34
kbern328-Jun-07 3:34 
Questionimage from server ? Pin
porsti27-Jun-07 5:01
porsti27-Jun-07 5:01 
AnswerRe: image from server ? Pin
Dave Kreskowiak27-Jun-07 5:11
mveDave Kreskowiak27-Jun-07 5:11 
AnswerRe: image from server ? Pin
Psycho-*Coder*-Extreme27-Jun-07 18:06
Psycho-*Coder*-Extreme27-Jun-07 18:06 
QuestionSetting the Help Window with the HelpProvider Control Pin
RichFeldman27-Jun-07 4:09
RichFeldman27-Jun-07 4:09 
QuestionGenerating Unique Alpha-Numeric ID's? Pin
DarynRoberts27-Jun-07 3:35
DarynRoberts27-Jun-07 3:35 
AnswerRe: Generating Unique Alpha-Numeric ID's? Pin
nlarson1127-Jun-07 4:03
nlarson1127-Jun-07 4:03 
GeneralRe: Generating Unique Alpha-Numeric ID's? Pin
DarynRoberts27-Jun-07 22:02
DarynRoberts27-Jun-07 22:02 
GeneralRe: Generating Unique Alpha-Numeric ID's? Pin
nlarson1128-Jun-07 3:32
nlarson1128-Jun-07 3:32 
GeneralRe: Generating Unique Alpha-Numeric ID's? Pin
DarynRoberts29-Jun-07 0:52
DarynRoberts29-Jun-07 0:52 
AnswerRe: Generating Unique Alpha-Numeric ID's? Pin
Guffa27-Jun-07 12:31
Guffa27-Jun-07 12:31 
GeneralRe: Generating Unique Alpha-Numeric ID's? Pin
Mycroft Holmes27-Jun-07 23:00
professionalMycroft Holmes27-Jun-07 23:00 
GeneralRe: Generating Unique Alpha-Numeric ID's? Pin
Guffa28-Jun-07 2:10
Guffa28-Jun-07 2:10 
Answerthanks Pin
DarynRoberts28-Jun-07 22:06
DarynRoberts28-Jun-07 22:06 
QuestionFSO.FolderExists Problem Pin
DanB198327-Jun-07 1:17
DanB198327-Jun-07 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.