Staredit Network > Forums > Modding Assistance > Topic: [GPTP] TerminatePlugin()?
[GPTP] TerminatePlugin()?
Aug 13 2012, 10:11 am
By: Sand Wraith  

Aug 13 2012, 10:11 am Sand Wraith Post #1

she/her

Does anyone know if this function actually works or anything?

EDIT:

(Actually, I'm fairly certain this function /is/ called and /does/ work. I can write code to crash SC as it exits, but see below.)

I've also tried writing a test file in this function, but it either does not work or it is appearing somewhere I do not expect it to. (Not in any of my StarCraft directories - maybe a system one?)

qdp.cpp
Code
 BOOL WINAPI TerminatePlugin() {
   //Called when starcraft closes

     // BROKEN AS FUCK, I DON'T EVEN KNOW IF IT IS CALLED

    std::ofstream musicCheckEnd("music", ios::in);
    if(musicCheckEnd.is_open()) // music was enabled
    {
        // perform cleanup
        std::ofstream musicExit("exit", ios::out);
        musicExit.close();
    }
    musicCheckEnd.close();

   return true;
 }


EDIT2:

Clarification. If I place the file "music" in either my SCBW main directory where the SC EXE is or where the mod's EXE is, it doesn't work. I don't know where else it could be reading/writing to, though.

Post has been edited 1 time(s), last time on Aug 13 2012, 10:44 am by Sand Wraith.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[05:01 pm]
NudeRaider -- Vrael
Vrael shouted: because you perfectly guessed SEN's root password and we cant have that displayed all over the shoutbox
given Moose's post I don't think he had to guess. ^^
[04:53 pm]
NudeRaider -- lil-Inferno
lil-Inferno shouted: Nude why'd you delete my shout
why not? :awesome:
[04:26 pm]
Vrael -- because you perfectly guessed SEN's root password and we cant have that displayed all over the shoutbox
[03:58 pm]
lil-Inferno -- sadjfjkasdhfijsadhmfcjhsdajkvfmjadslkfhjsdkahf
[03:58 pm]
lil-Inferno -- Nude why'd you delete my shout
[03:35 pm]
NudeRaider -- never trust a statistic you haven't forged yourself
[04:37 am]
Ultraviolet -- 80% of statistics are made up on the spot
[2026-6-08. : 8:05 pm]
Symmetry -- 50% of strings in starcraft are references
[2026-6-07. : 1:59 am]
RIVE -- Lots of fun little nods to different works of others in the cheats too.
[2026-6-06. : 5:17 pm]
Oh_Man -- so i was today years old wen i learned rebel yell starcraft mission is named after a billy idol song. makes me wonder wat other missions are named after songs
Please log in to shout.


Members Online: Roy, RIVE