This topic is now archived and is closed to further replies.

DirectDraw and C++

This topic is 5110 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have attempted to use the DirectDraw function DirectDrawEnumerateEx in my code. I have created a function: BOOL WINAPI MYDDEnumCallbackEx(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID pParameter, HMONITOR hm) { ... } to pass as the first argument to the DirectDraw function. However I get the following error: D:\PROJECTS\Engine\V0P01\DirectDraw.cpp(98) : error C2664: ''DirectDrawEnumerateExA'' : cannot convert parameter 1 from ''int (struct _GUID *,char *,char *,void *,struct HMONITOR__ *)'' to ''int (__stdcall *)(struct _GUID *,char *,char *,void *,struct HM ONITOR__ *)'' The function I created has the same form of the function that is the paramter of the DirectDraw function. Why does this happen? and how can I fix it?

Share this post

Link to post
Share on other sites