Information générale
Titre:
Passing parameters to ole automation server dll
I'm trying to use a function from an ole server. The prototype is:
GetAuth(string Code,string Machid,short Users)
I am getting a type mismatch error returned from the server. Apparently its the short Users parameter that causes the error because if I omit parameter 3 I get an error message telling me the number of parameters is incorrect. If I then remove the @ symbol from one to the two string types I get the type mismath error again.
Here is how I try to use it:
lccode = space(60)
lcid = space(60)
lnusers = 0
object.GetAuth(@lccode,@lcid,@lnusers)
The server is supposed to modify the parameters so I can use them in my program. I have tried passing the parameters by value instead of reference but still can't get it to work.
Any suggestions would be greatly appreciated.
Thanks,
David
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement