Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20

Thread: DLL: PCPower

  1. #1
    Join Date
    May 2006
    Posts
    5,380

    DLL: PCPower

    This DLL enables you to set the users PC and monitor power state from within your AMS project.

    The functions are:

    SetPCPowerState

    arguments:
    1 = Hibernate
    2 = Standby
    3 = LogOffUser
    4 = Reboot
    5 = ShutDown

    returns: nothing

    example usage:
    Code:
    result = DLL.CallFunction("AutoPlay\\Docs\\PCPower.dll", "SetPCPowerState", 1, DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);


    SetMonitorPowerState

    arguments:
    1 = Show Screen Saver
    2 = Standby Monitor
    3 = Turn Off Monitor
    4 = Turn On Monitor

    returns: nothing

    example usage:
    Code:
    result = DLL.CallFunction("AutoPlay\\Docs\\PCPower.dll", "SetMonitorPowerState", 3, DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  2. #2
    Join Date
    Aug 2006
    Posts
    355
    EXCELLENT!!!!!!!!!!!!!!

    Very very thanks!!!

    One questio:

    ¿works in windows vista?

    And other question:

    The accion reboot or ShutDown is forced (force windows for run this acction, and closs the aplication (no wait))

    ¿it posiible one option for force action and NO force action??

    Very thanks!

  3. #3
    Join Date
    Oct 2006
    Posts
    209
    well you can use shutdown -s -f and shutdown -s and if you want to give some warning you can use -t 100 -c "Hellow IR"
    that should do the job

  4. #4
    Join Date
    Aug 2006
    Posts
    355
    RizlaUK please add option "NO force action" in the DLL file please!!

  5. #5
    Join Date
    May 2006
    Posts
    5,380
    Sure, i can make it ask for conformation, but im not at my pc and dont have PB installed here, i will make the changes as soon as i can
    Open your eyes to Narcissism, Don't let her destroy your life!!

  6. #6
    Join Date
    Jul 2007
    Posts
    158
    Good idea & Nice job

    Thanx

  7. #7
    Join Date
    Aug 2006
    Posts
    355
    Very tanks RizlaUK

    waiting the updated .dll

    Very very thanks

  8. #8
    Join Date
    May 2006
    Posts
    5,380
    Hey Solmos, i cant find the source files to this dll so i am going to have to rewrite the whole thing, it should not take to long, while i am at it is there anything else you need in the dll ??
    Open your eyes to Narcissism, Don't let her destroy your life!!

  9. #9
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    How about creating a DLL to win the Euro Millions!
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  10. #10
    Join Date
    Aug 2006
    Posts
    355
    1. System Poweroff (forced action or not)
    2. System reboot (forced acction or not)
    3. Close session (forced action or not)
    4. Suspend (forced action or not)
    5. Hibernate system (forced action or not)

    ¿6. Clearclipboard?

    ¿7. Search for multiple file extensions?

    ¿8. Get target shortcut? (return de real pach of de acces direct (file .lnk))

    and of course

    1 = Show Screen Saver
    2 = Standby Monitor
    3 = Turn Off Monitor
    4 = Turn On Monitor



    Very thanks

  11. #11
    Join Date
    May 2006
    Posts
    5,380
    lmao...i dont think PB is that powerful


    AMS can do it though

    Here
    Code:
    a = Math.Random(1, 50);
    b = Math.Random(1, 50);
    c = Math.Random(1, 50);
    d = Math.Random(1, 50);
    e = Math.Random(1, 50);
    f = Math.Random(1, 9);
    g = Math.Random(1, 9);
    
    
    result = Dialog.Message("Notice", "Your Lucky Euro Millions Numbers Are : "..a..", "..b..", "..c..", "..d..", "..e..", "..f..", "..g.."\r\n\r\nRemember To Donate 25% To D-Net Software When You Win", MB_OK, MB_ICONNONE, MB_DEFBUTTON1);
    Remember.....anyone wins useing this code.....i want 25%


    EDIT, ok sol, ill see what i can do
    Open your eyes to Narcissism, Don't let her destroy your life!!

  12. #12
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    lol .. that's funny, even tho the code says to donate 25% - when i ran it it only said 5%

    Just for a laugh, I had a go at making something similar to this for the Lotto .. a while back now. I'd coded it to generate as many lines of numbers as entered in input box [we're talking min 10,000], then go thru to find the six most common numbers.
    I figured you cant get much worse! The six most common numbers from so many lines stands a pretty good chance, right?

    Yeah well i scrapped the idea when i ran it and it was still going when i got home from work the next day
    .. and it was running soooo sloooow - lol

    What was i thinking?!
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  13. #13
    Join Date
    May 2006
    Posts
    5,380
    hmmm, well a small bug is going to lose me 20% of everyones winnings..........peps....read the small print....plz 25% for the first win, 50% for the second win, and 100% of all wins thereafter, as agreed by using this code


    that sounds a good idea, if there is some way to to do it so it dosent lock up or run slow, i might look into something like that when iv nothing better to do
    Open your eyes to Narcissism, Don't let her destroy your life!!

  14. #14
    Join Date
    May 2006
    Posts
    5,380
    ok Solmos, heres the pc power part of the dll, b4 i do any more i want you to test this for me

    i will add the monitor power and other stuff when i know this works ok

    just one more thing.....do you want to add your own text to the conformation messages? (test the dll and you will see what i mean)
    Last edited by RizlaUK; 02-01-2009 at 11:35 AM.
    Open your eyes to Narcissism, Don't let her destroy your life!!

  15. #15
    Join Date
    Aug 2006
    Posts
    355
    Thanks

    But NO message confirmation please

    tested system reboot in windows xp pro sp2

    - NO force accion not work.
    - system reboot no work all times

    --------------------

    1. System Poweroff (forced action or not)
    2. System reboot (forced acction or not)
    3. Close session (forced action or not)
    4. Suspend (forced action or not)
    5. Hibernate system (forced action or not)

    ¿6. Clearclipboard?

    ¿7. Search for multiple file extensions?

    ¿8. Get target shortcut? (return de real pach of de acces direct (file .lnk))

    Add other function if is posible

    Folder copy



    and of course

    1 = Show Screen Saver
    2 = Standby Monitor
    3 = Turn Off Monitor
    4 = Turn On Monitor
    Last edited by Solmos; 10-09-2007 at 03:28 PM.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. VB Net DLL Problem
    By Buffman in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 10-04-2006, 08:27 AM
  2. Official Release Of SetMask DLL
    By Worm in forum AutoPlay Media Studio 5.0
    Replies: 23
    Last Post: 01-24-2005, 09:00 PM
  3. Calling a DLL
    By matrix in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-26-2001, 07:47 PM
  4. SUF6 - Call DLL action
    By Romahe in forum Setup Factory 5.0
    Replies: 1
    Last Post: 11-27-2001, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts