Jump to content
  • Advertisement


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


DDraw Modes Enumeration problem

This topic is 6701 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

Hi! , im trying to enumerate the supported modes on some ddraw device , im define my enumerate function in a class , like that:
class CEnumerate {
       static BOOL WINAPI DDEnumDevices(GUID FAR *lpGUID,
                                LPSTR lpDriverDescraption,
			        LPSTR lpDriverName,
			        LPVOID lpContext,
			        HMONITOR hm);

                           LPVOID  lpContext); // in this defintion the problem

       HRESULT EnumerateDevices(DD_DEVICE_INFO *DDDeviceInfo);

and i call to the "DDEnumModes" function with this command:

DDrawObj->EnumDisplayModes(0,NULL,(LPVOID) info,DDEnumModes);

now, when i trying to compile it , i get this error:

"C:\VSDXWLib\CEnum.cpp(53) : error C2664: 'EnumDisplayModes' : cannot convert parameter 4 from 'long (__stdcall CEnumerate::*)(struct _DDSURFACEDESC *,void *)' to 'long (__stdcall *)(struct _DDSURFACEDESC2 *,void *)'
        There is no context in which this conversion is possible"

somebody know's why? Edited by - Xeno on 7/13/00 3:11:17 PM Edited by - Xeno on 7/13/00 3:12:44 PM Edited by - Xeno on 7/13/00 3:13:37 PM Edited by - Xeno on 7/13/00 3:14:02 PM

Share this post

Link to post
Share on other sites
Try this declaration:

static HRESULT WINAPI DDEnumModes(LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext);


Edited by - syzygy on July 13, 2000 12:15:09 AM

Share this post

Link to post
Share on other sites
Your DDEnumModes function needs to be static and you may have to cast away the namespace when you pass it into the function: e.g.




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!