Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello guys, I´m having a hard time with this SDK called QCamApi.
For instance, I´m trying to get this method, without any success.

C++
/*
 *  QCam_ListCameras()
 *  
 *  Discussion:
 *    Retrieve a list of connected cameras.
 *  
 *  Parameters:
 *	(IN)	pList - User allocated array to fill in
 *	(OUT)	pList - Filled in with the list of connected cameras
 *	(IN)	pNumberInList - Length of the array
 *	(OUT)	pNumberInList - Number of cameras found
 *	
 *	Remarks: 
 *	  On return, pNumberInList may contain a number that is bigger than the array size.
 *
 *  Result:
 *    QCam_Err code  //QCam_Err is a typedef enum with several error codes
 */
    #define QCAMAPI __stdcall;
    extern QCam_Err QCAMAPI QCam_ListCameras
    (
    QCam_CamListItem*   pList,              
    unsigned long*      pNumberInList       
    );


The document that come along with has this example:

C++
QCam_CamListItem list[10];
unsigned long listLen = sizeof(list)/sizeof(list[QCam_CamListItem]);
// load the driver
QCam_LoadDriver();
// get a list of the cameras
QCam_ListCameras(list, &listLen);


I got this Erros/Warning List

Warning 1 warning C4229: anachronism used : modifiers on data are ignored
Error 2 error C2078: too many initializers
Error 3 error C2440: 'initializing' : cannot convert from 'unsigned long *' to 'QCam_Err'
4 IntelliSense: a value of type "QCam_CamListItem *" cannot be used to initialize an entity of type "QCam_Err"
5 IntelliSense: expected a ')'


I believe I´m calling this __stdcall in the wrong way, I´ve tried a lot of things. Hope you can help me.

If someone wants more information, the QCam SDK is available here (http://www.qimaging.com/support/downloads/[^]
Posted
Comments
Matthew Faithfull 15-Mar-13 11:26am    
Have you #included the necessary header or headers from the SDK?
What form does the SDK take, are you linking to a QCam Dll of some kind?
It might also be helpful if you post the complete error messages with line numbers as it's a little difficult to determine if the errors you're listing actually comes from the lines you've posted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900