Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dialer Classes?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00290669
Message ID:
00296405
Vues:
49
Hi Harry,

Sorry to take so long, but I was out of town for the Thanksgiving holiday.

>resending this cos I'm getting desperate. Figure you must have missed it last time round!
>
>********************************************************
> I'm having one or two problems making your dialer code dial!
>
> question 1 - the parameter 'commport' - what form should it take? It seems to want the form 'COM3' . Is that right?

Yes, that's the form

> question 2 - should the variable 'lccmnd' be declared at the same time as 'lcmnd' or is it a misprint? (it falls over, if I can get it to that point, complaining that it doesn't
> recognise the variable)

Yes again. It's a typo on my part.

> question 3 - where does the 'createfile' command come from? Went looking for help on it to see if it would help me with the previous questions, but there's no reference to it
> in the MSDN help.

CreateFile is part of the Win32 API. It resides in Kernal32.dll.

> the problem I'm getting most frequently is that the variable 'lnport' is nearly always -1 following the line
>
> lnport = CreateFile(CommPort, GENERIC_READ + GENERIC_WRITE, 0, 0, 3, 0, 0)

-1 is INVALID_HANDLE_VALUE. The reason I suspect that you're getting this is that, in my haste, I neglected to add the @ sign to the CommPort parameter. Try:

lnport = CreateFile(@CommPort, GENERIC_READ + GENERIC_WRITE, 0, 0, 3, 0, 0)

If you still get -1, add this code, in the appropriate place.
* Add this to the other declarations
DECLARE INTEGER GetLastError IN Win32API
* Add this after the call if -1 is returned
lnerror = GetLastError()
This will return the error code.

> as a result of which, it never (well except once when I then got the problem with 'lccmnd') runs the code following
>
> IF lnport > 0
>
> I think this may be because I set the com port 'live' and didn't defuse it before my next attempt...
>
> but what else am I missing?
>
Let me know if this fixes it.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform