Author Message
RicardoRoque
Joined: Mar 18, 2014
Messages: 6
Offline
Hi,

I'm working with TSAPI, and I have been a problem.

I'm getting the message:

Invalid argments '
Candidates are:
void acsEnumServerNames(?, char(*)(char*, unsigned long int), unsigned long int)'

Anyone has the same problem?


tks
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
So what does the code that you are making the call to acsEnumServerNames() look like (along with the parameter definitions for what you are passing in)? It appears you have a syntax or argument type mismatch. Go back into the header file and check your parameters and call to the method.
RicardoRoque
Joined: Mar 18, 2014
Messages: 6
Offline

At acs.h method is like:

..

TSAPI
acsEnumServernames (StreamType_t streamType,
EnumServerNamesCB userCB,
unsigned long lParam);
..

My Code is:

#include <nts/tsplatfm.h>
#include <nts/csa.h>
#include <nts/ctipdefs.h>

#include <cstring>

Boolean DisplayServerNames(char* szServicename, unsigned long lParam){
Boolean bReturnValue = FALSE;
if(strcmp(szServiceName,"") != 0){
Boolean bReturnValue = TRUE;
}
return bReturnBalue;

}

void EnumerateServiceNames(){
usigned long val = 0;

long ret = acsEnumServerNames(stCsta, DisplayServerNames, val); // linha com erro

}

It is a very simple code, i can't understanding the error.

tks
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
What is your definition of stCsta? I am assuming

StreamType_t ctCsta;


If that is the case then my guess is how the second parameter is being addressed

Try

long ret = acsEnumServerNames(stCsta, &DisplayServerNames(), val); // linha com erro

and then
TSAPI ret = acsEnumServerNames(stCsta, DisplayServerNames, val); // linha com erro
RicardoRoque
Joined: Mar 18, 2014
Messages: 6
Offline

My problem happend because my tsapi headers was at folder /usr/include/nts.

I solve the problem coping all the headers to /usr/include and works.


thk for your help.
JohnBiggs
Joined: Jun 20, 2005
Messages: 1139
Location: Rural, Virginia
Offline
Thanks to the compiler for pointing out it could not load the header file! Glad you figured it out...
Go to:   
Mobile view