summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/pluginapi.h2
-rw-r--r--core/main.cpp10
-rw-r--r--core/service.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/api/pluginapi.h b/api/pluginapi.h
index cce9605..9e3a161 100644
--- a/api/pluginapi.h
+++ b/api/pluginapi.h
@@ -8,7 +8,7 @@
typedef INT_PTR (*SERVICE)(WPARAM,LPARAM);
typedef struct tagPLUGINLINK {
- HANDLE (*CreateServiceFunction)(const char *,SERVICE);
+ HANDLE (*CreateServiceFunction)(const char *,SERVICE*);
INT_PTR (*CallService)(const char *,WPARAM,LPARAM);
int (*ServiceExists)(const char *);
} PLUGINLINK;
diff --git a/core/main.cpp b/core/main.cpp
index 7e7586d..32e066c 100644
--- a/core/main.cpp
+++ b/core/main.cpp
@@ -15,7 +15,7 @@ list<service*> services;
int LoadModules();
INT_PTR CallService(const char *name, WPARAM w, LPARAM l);
-HANDLE CreateServiceFunction(const char *name, SERVICE pService);
+HANDLE CreateServiceFunction(const char *name, SERVICE *pService);
int ServiceExists(const char *name);
int GetPluginInfoList(WPARAM, LPARAM);
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
if((*p)->getFuncs().loaded)
(*p)->getFuncs().loaded();
}
-// CreateServiceFunction("GetPluginInfoList", GetPluginInfoList);
+ CreateServiceFunction("GetPluginInfoList", (INT_PTR (**)(WPARAM, LPARAM))&GetPluginInfoList);
for(;;)
Sleep(1000);
return 0;
@@ -115,11 +115,11 @@ plugin::~plugin()
FreeLibrary(hModule);
free(szPluginName);
}
-service::service(const char *name, const SERVICE &service)
+service::service(const char *name, SERVICE *service)
{
szName = new char [strlen(name)+1];
strcpy(szName, name);
- *pService = service;
+ pService = service;
}
const char *service::getName()
{
@@ -141,7 +141,7 @@ INT_PTR CallService(const char *name, WPARAM w, LPARAM l)
}
return 0;
}
-HANDLE CreateServiceFunction(const char *name, const SERVICE pService)
+HANDLE CreateServiceFunction(const char *name, SERVICE *pService)
{
services.push_back(new service(name, pService));
}
diff --git a/core/service.h b/core/service.h
index dba551b..5c90929 100644
--- a/core/service.h
+++ b/core/service.h
@@ -5,7 +5,7 @@ class service
public:
const char *getName();
const SERVICE *getService();
- service(const char *name, const SERVICE &service);
+ service(const char *name, SERVICE *service);
~service();
private:
char *szName;