Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: Built Error HWND on Mac - XCode

This topic is old and might contain outdated or incorrect information.

ChacklPRO InfinityMember since 2007
Hello!

Since yesterday im' trying to port my Slipmode effect on Mac.

Well i completly copied a new header-Part to the VdjPlugin.h which now looks like that for the mac part:
#elif (defined(__APPLE__) || defined(MACOSX) || defined(__MACOSX__))
#define VDJ_EXPORT __attribute__ ((visibility ("default")))
#define VDJ_API
#define VDJ_BITMAP char *
#define VDJ_HINSTANCE void *
#define VDJ_WINDOW WindowRef
#define PLUGIN_BITMAP "bitmap.bmp" /* For TVdjPluginInfo->Bitmap */
#define S_OK ((HRESULT)0x00000000L)
#define S_FALSE ((HRESULT)0x00000001L)
#define E_NOTIMPL ((HRESULT)0x80004001L)
#define MAKEINTRESOURCE(i) (LPSTR)((ULONG_PTR)((WORD)(i)))
#define CLASS_E_CLASSNOTAVAILABLE -1
#define NO_ERROR 0
#define wsprintf sprintf
#define __stdcall /* For old plugins compatibility */
typedef long HRESULT;
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
} GUID;
typedef unsigned long ULONG;
typedef unsigned long DWORD;
#endif


Since now every line could be ported correct to mac but there is one line that makes troubles to me:
// Custom user-interface
// Create a Window using CreateWindow() or CreateDialog(), and send back the HWND.
// If you return E_NOTIMPL, the default interface will be used.
// Error line ***************************************************
virtual HRESULT VDJ_API OnGetUserInterface(VDJ_WINDOW *hWnd) {return E_NOTIMPL;}
// End Error line ***************************************************
VDJ_HINSTANCE hInstance;
int Width,Height;


It is saing that i have an error - and hWnd could not be defined.

Is there anything i'm doing wrong?

Pleas note that i'm only using a virtual mac with iatkos on it. Mac OS is 10.8. Plugin Base SDK is OS 10.6 at me. I'm a Windows User (and i will stay at win!) and i'm just using mac to deliver my plugins that are not marked as "VST" to the mac users.

Regards, C.Hackl

 

Posted Fri 12 Oct 12 @ 3:56 am
SBDJPRO Infinity Member since 2006
Sounds like a missing header as WindowRef is undefined. Have you included AGL/agl.h?
 

Posted Fri 12 Oct 12 @ 6:27 am
ChacklPRO InfinityMember since 2007
No I have not :D - and now it is working :D - Big thanks!!!
 

Posted Fri 12 Oct 12 @ 10:29 am
djcelPRO InfinityModeratorMember since 2004
and you can change the line

#define VDJ_HINSTANCE void *

by

#define VDJ_HINSTANCE CFBundleRef
 

Posted Sun 14 Oct 12 @ 3:30 pm
ChacklPRO InfinityMember since 2007
djcel wrote :
and you can change the line

#define VDJ_HINSTANCE void *

by

#define VDJ_HINSTANCE CFBundleRef


Abnd what would be better? the "AGL/agl.h" or "#define VDJ_HINSTANCE CFBundleRef"? With one will hab the better and faster quality?
 

Posted Mon 15 Oct 12 @ 3:05 am
djcelPRO InfinityModeratorMember since 2004
No it's not either one or one.

It's just a note after reading your header ;-)

Anyway, I don't see the use of a Window in your plugin..??
 

Posted Mon 15 Oct 12 @ 1:51 pm
ChacklPRO InfinityMember since 2007
well if i exclude the line that was not working it crashed after the enable. Also the button was not displayd. baybe VDJ Needs this to print the button to the browser, i do not now exactly but without the line it crashes and with the error was not able to complie it :D
 

Posted Mon 15 Oct 12 @ 4:39 pm
djcelPRO InfinityModeratorMember since 2004
can you post here the error
 

Posted Mon 15 Oct 12 @ 4:50 pm
ChacklPRO InfinityMember since 2007
well it just says me a red "!" and sais that hwnd is not defined. If i exclude the line vdj lets me see the effect ut if i activate it vdj crashes (only in mac)

But now it is done :D - if you saw - the slipmode is downloadable for mac now ;)
 

Posted Tue 16 Oct 12 @ 1:41 am


(Old topics and forums are automatically closed)