setupapi: unimplemented function setupapi.dll.SetupPromptReboot

James Hawkins truiken at gmail.com
Fri Jan 27 19:44:44 CST 2006


On 1/27/06, Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> * On Fri, 27 Jan 2006, James Hawkins wrote:
> > * On 1/27/06, Saulius Krasuckas <saulius2 at ar.fi.lt> wrote:
> > >
> > > Is anyone working on this for Wine?
> > > Any ideas about the ReactOS code?
> >
> > Read through it thoroughly and make note of all the details of the
> > function.  Then write as many test cases as you can for the function.
> > Test the details you found on msdn and any other cases you can think of.
> > This should give you a better idea of how to implement the function
> > because you'll understand what needs to happen for each particular case.
>
> James, I wasn't asking about how should I hack on unimplemented function.
> My interest is focused on work of another guys, which is done already. :)
>

I based the assumption on your statement, "I stuck upon this function
right now."  You said you were stuck, so I offered suggestions on how
to move forward.  I looked at the ReactOS implementation and saw that
it was #ifdefined out, so I also assumed that wasn't code we should be
porting back to Wine.  Steven's comments verify this.

> BTW, how would you ensure that the testing of this function succeeds if
> you pass the flag to it which reboots the machine and probably kills the
> test-process? ;-)
>

I was suggesting you write tests for your own testing, not adding unit
tests to Wine's test suite, though that's always good.  To answer your
original question, msdn states that the third parameter of
SetupPromptReboot, ScanOnly, is a BOOL that determines whether the
user is asked  to reboot or not.  If ScanOnly is TRUE, the user is not
prompted to reboot, and no shutdown occurrs.  msdn also says this
about ScanOnly:

"Use ScanOnly to determine if shutdown is necessary separately from
actually initiating a shutdown."

You can tests invalid parameters, using a valid FileQueue, see what
values are returned etc.

You won't be able to test a successful reboot in Wine's test suite,
but you can test it with your personal tests.  Besides that, you can
set ScanOnly to TRUE and you get all the results you would get if the
machine were to reboot without actually rebooting the machine.

--
James Hawkins



More information about the wine-devel mailing list