0 Members and 1 Guest are viewing this topic.
//---------------------------------------------------------------------------#include <vcl.h>#include <windows.h>#pragma hdrstop#include "aimp2_sdk.h"//---------------------------------------------------------------------------class TMyPlug: public TInterfacedObject, public IAIMPAddonHeader{private: IAIMP2Controller *ctrl;public: HRESULT __stdcall QueryInterface(const GUID& IID, void **Obj) { return TInterfacedObject::QueryInterface(IID, (void *)Obj); } ULONG __stdcall AddRef() { return TInterfacedObject::_AddRef(); } ULONG __stdcall Release() { return TInterfacedObject::_Release(); } BOOL __stdcall GetHasSettingsDialog() { return false; } PWCHAR __stdcall GetPluginAuthor() { return L"MikeTSoft"; } PWCHAR __stdcall GetPluginName() { return L"Cool MikeTSoft Plugin"; } void __stdcall Finalize() {} void __stdcall Initialize(IAIMP2Controller *AController) { ctrl=AController; } void __stdcall ShowSettingsDialog(HWND AParentWindow) {}};//---------------------------------------------------------------------------extern "C" __declspec(dllexport) BOOL __stdcall AIMP_QueryAddonEx(IAIMPAddonHeader *&AHeader){ AHeader=dynamic_cast<IAIMPAddonHeader *>(new TMyPlug()); return TRUE;}//---------------------------------------------------------------------------#pragma argsusedint WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved){ return 1;}//---------------------------------------------------------------------------
после чего методы начали работать, но вылетает AV, ждем комментариев Artem-а
FAddonHeader := AHeader; FPluginAuthor := AHeader.GetPluginAuthor; FPluginName := AHeader.GetPluginName; FAddonHeader.Initialize(AddonController);
extern "C" __declspec(dllexport) BOOL __stdcall AIMP_QueryAddonEx(IAIMPAddonHeader* &AHeader);
[BCC32 Warning] aimp2_sdk.h(10): W8058 Cannot create pre-compiled header: initialized data in header
извиняюсь, это был вопрос)
TimerP=SetTimer(NULL, 0, 500 , (TIMERPROC)Timer);
Как мне запустить таймер при инициализации с этой новой структурой?Это Code: [Select]TimerP=SetTimer(NULL, 0, 500 , (TIMERPROC)Timer); не работает.
void CALLBACK _export TimerProc(HWND hwnd, UINT msg, UINT idTimer, DWORD dwTime)
[C++ Warning] Unit1.cpp(22): W8018 Assigning unsigned long to TColor[C++ Warning] Unit1.cpp(37): W8018 Assigning unsigned long to TColor[C++ Warning] Unit1.cpp(40): W8018 Assigning unsigned long to TColor[C++ Error] GdiplusTypes.h(459): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(461): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(483): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(484): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(485): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(486): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(647): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(648): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(649): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(650): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(671): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(672): E2268 Call to undefined function 'max'[C++ Error] GdiplusTypes.h(673): E2268 Call to undefined function 'min'[C++ Error] GdiplusTypes.h(674): E2268 Call to undefined function 'min'[C++ Warning] GdiplusHeaders.h(582): W8022 'Bitmap::Clone(const Rect &,int)' hides virtual function 'Image::Clone()'[C++ Warning] GdiplusBrush.h(617): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusBrush.h(656): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusPen.h(316): W8027 Functions containing switch are not expanded inline[C++ Warning] GdiplusPath.h(124): W8027 Functions containing some if statements are not expanded inline[C++ Warning] GdiplusPath.h(1204): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusPath.h(1234): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusPath.h(1374): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusPath.h(1416): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusGraphics.h(1410): W8027 Functions containing for are not expanded inline[C++ Error] GdiplusGraphics.h(34): E2015 Ambiguity between 'Gdiplus::Graphics::Graphics(void *)' and 'Gdiplus::Graphics::Graphics(void *,int)'[C++ Warning] GdiplusFontCollection.h(70): W8027 Functions containing for are not expanded inline[C++ Warning] GdiplusFont.h(127): W8027 Functions containing some if statements are not expanded inline[C++ Error] gdip.cpp(25): E2015 Ambiguity between 'Gdiplus::Graphics::Graphics(void *)' and 'Gdiplus::Graphics::Graphics(void *,int)'