Skip to content

Instantly share code, notes, and snippets.


Appendme/task.cpp Secret

Created Nov 7, 2019
What would you like to do?
#include "pch.h"
#include "task.h"
namespace AIMP
Task::Task(TaskFunc calledFunc)
: _func(calledFunc)
_func = nullptr;
void WINAPI Task::Execute(IAIMPTaskOwner* owner)
if (owner->IsCanceled()) return;
if (_func)
#pragma once
#include "unknown.h"
#include <functional>
namespace AIMP
#include "sdk/apiThreading.h"
using TaskFunc = void(__stdcall*)(IAIMPTaskOwner*);
//using TaskFunc = std::function<void(IAIMPTaskOwner*)>;
class Task
: public UnknownII<IAIMPTask>
Task(TaskFunc calledFunc);
void WINAPI Execute(IAIMPTaskOwner* owner) override;
TaskFunc _func;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.