Pc herunterfahren



  • Sind alles ganz normale WinAPI Funktionen 😉 Zeig mal die Fehlermeldungen...

    PS: Nice das de die Forensuche benutzt hast... mal nen vernünftiger Member 🙂



  • ausschliesslich in c++ du musst den code zu c portieren



  • ??? 😮

    ok...danker erstma...

    muss ich meinen code anpassen oda den code der gepostet wurde...

    naja eigl egal...ich kann nur C und habe keine ahnung wie ich das anpassen sollte 😞

    aba evtl kennt hier jemand noch eine andere möglichkeit...

    ich habe auch das mit

    system("shutdown.exe -s -t00");
    

    probiert aba irgendwie geht das net...

    also ich würde mich üpber alles freuen...thx



  • jetzt habe ich ganz vergessen die fehlermeldungen zu posten...ups 🙄

    ok...

    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:11: error: syntax error before "MySystemShutdown"
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:11: warning: data definition has no type or storage class
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c: In function main': E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:51: warning:return' with a value, in function returning void
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:25: warning: return type of 'main' is not `int'

    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c: At top level:
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:115: error: syntax error before "MySystemShutdown"
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c: In function MySystemShutdown': E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:117: error: syntax error before ':' token E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:120: error: syntax error before ':' token E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:125: error:tkp' undeclared (first use in this function)
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:125: error: (Each undeclared identifier is reported only once
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:125: error: for each function it appears in.)
    E:\Downloads\Cstuff\Programme\Shutdowntimer\Shutdowntimer.c:126: error: SE\_PRIVILEGE\_ENABLED' undeclared (first use in this function) E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:128: error: syntax error before ':' token E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:130: error: syntax error before ':' token E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:133: error: syntax error before ':' token E:\\Downloads\\Cstuff\\Programme\\Shutdowntimer\\Shutdowntimer.c:136: error:true' undeclared (first use in this function)

    habe einfach mal alles reingemacht...also meist syntax error aba ich habe den code ja überniommen...wie gesagt ich muss das in C machen...evtl kommen daher die fehler...

    thx



  • Warum lest ihr d*m*e* S*a*t*s nie was man schreibt? Kopier die verd*m*e*n Fehlermeldungen mal hierrein!



  • du musst eine namespace reduktion durchführen da besagtes feature in c so nicht verfügbar ist.



  • Was ich sagen wollte ist du musst die :: überall wegmachen. 🤡



  • (D)Evil schrieb:

    Warum lest ihr d*m*e* S*a*t*s nie was man schreibt? Kopier die verd*m*e*n Fehlermeldungen mal hierrein!

    ??? kA, was du willst...hab doch die fehler gepostet...und die sternechen störn mich beim lesen von was auch imma das sein soll...

    @ General C++

    habe ich gemacht, also alle "::" wech, allerdings habe ich jetzt imma die fehler meldung

    blabla 'undeclared (first use in this function)
    

    ok heisst das ich die halt noch deklarieren muss...aba als was?

    [fals ihr euch wundert über meinen fragen, bin noch relativ neu auf dem gebiet der programierung]

    thx



  • Jo... hatte aber schon gepostet als das da noch net stand 😉 Also... hast de die Header drin.,.. hab die oben garnet dazugeschrieben sehe ich gerade... also... MSDN Library und die Funktionen nachgucken... da steht der Header unten bei,...



  • np... 🙂

    danke...das hat mir sehr geholfen... 👍 👍

    schönen abend noch

    THX 🙂


Anmelden zum Antworten