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:
00296781
Vues:
36
>> 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
>

It's platform-dependent (you may have to add or remove the trailing ":"; I don't know which platform he's on) and it has to be a valid, defined port - IOW, if you point at COM3: and there is no COM3: defined to the operating system, you're toast.
>> 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)
>

George, it shouldn't matter if you pass by val or by ref in the call - it expects to get an LPCTSTR, so if you've defined it as STRING @ in the DECLARE, it should be fine; nothing comes back in the parameter.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform