stax Posted July 29, 2008 Share Posted July 29, 2008 (edited) Hello, I'm coding a input plugin using C++, unfortunately I couldn't find a C++ sample and my C++ knowledge is rather poor. I've pasted the signatures of the docs, my code looks as follows: #include "stdafx.h" extern "C" { char* __stdcall Copyright() { return "stax"; } char* __stdcall Version() { return "1.0.0.0"; } char* __stdcall LibTyp() { return "input"; } char* __stdcall PluginName() { return "MceRemote"; } typedef (__stdcall *TInputCallback) (char *Sender;char *Event); // error occurs here //void __stdcall SetCallback(int Handle; TInputCallback Callback); //void __stdcall Showsettings(int handle); } I'm getting the following error: 1>d:\projekte\DVBViewer\mceremote\mceremote.cpp(25) : error C2143: syntax error : missing ')' before ';' 1>d:\projekte\DVBViewer\mceremote\mceremote.cpp(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>d:\projekte\DVBViewer\mceremote\mceremote.cpp(25) : error C2059: syntax error : ')' I've uploaded the entire project created with VS 2008 Express: http://www.mediafire.com/?gzzqpztmlzw What am I doing wrong? thx stax Edited July 29, 2008 by stax Quote Link to comment
stax Posted July 29, 2008 Author Share Posted July 29, 2008 After refreshing my C++ knowledge and playing around I was now able to compile it with following changes: typedef void (__stdcall *TInputCallback) (char *Sender, char *Event); void __stdcall SetCallback(int Handle, TInputCallback Callback) { } Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.