Hey there,
I'm trying to use the SetSuspendState() function to hibernate the computer, but I have no idea what parameters I should send to it. The prototype is "BOOLEAN WINAPI SetSuspendState(BOOLEAN, BOOLEAN, BOOLEAN);"
Since I'm a somewhat beginner in c++ programming, I don't really have an idea what BOOLEAN means and what I should send as a BOOLEAN. I tried the "true" and "false", numbers and variables, but none worked.
The compiler error is as follows:
[Linker error] undefined reference to `SetSuspendState@12'
By the way -- I'm using Dev-C++ 4.9.9.2
I checked about SetSuspendState() in DaniWeb, and googled it, but came up with nothing.
Thanks in advance to the helpers!
unbeatable0
32
Junior Poster in Training
Recommended Answers
Jump to Post>>I checked about SetSuspendState() in DaniWeb, and googled it, but came up with nothing.
Not supprised about DaniWeb, but google had lots of linksAlways either search MSDN or google for all …
Jump to PostI checked about SetSuspendState() in DaniWeb, and googled it, but came up with nothing.
Thanks in advance to the helpers!Are you sure you googled it? There's about a billion relevant hits on 'setsupendstate'.
Jump to PostYou have to make a project then it will work. Just create a new project and copy the file into it.
Jump to PostLet me have a look in my crystal ball....
I think you have an error on line 26, and it probably has something to do with a '%' ....
In other words: post the code
All 14 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
dougy83
74
Posting Whiz in Training
unbeatable0
32
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
unbeatable0
32
Junior Poster in Training
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
Ancient Dragon
commented:
You must need new glasses :)
+36
unbeatable0
32
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
unbeatable0
32
Junior Poster in Training
dougy83
74
Posting Whiz in Training
unbeatable0
32
Junior Poster in Training
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Nick Evan
commented:
Making the rep count as requisted by OP :)
+9
unbeatable0
32
Junior Poster in Training
dougy83
74
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.