Jump to content
  • Advertisement


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

The C modest god

DirectDraw and C++

This topic is 5395 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
That''s rather strange. Try forcing it with

BOOL __stdcall MYDDEnumCallbackEx(GUID yadayadayada...)

Also, did you change both the declaration and the definition?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!