declare function Open Com ( byref options as string, AS filenum as long ) as long
The result of var hFile = FreeFile() has the same size as a pointer (a handle from OS)
open com are declared as long (32-bit) but should be integer (32/64-bit)
Joshy
[solved] docu about open com must be changed.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
[solved] docu about open com must be changed.
Last edited by D.J.Peters on Oct 16, 2017 2:44, edited 1 time in total.
Re: docu about open com must be changed.
Not agree:
Code: Select all
#print typeof(Open Com("COM1:9600,N,,2" As 1))
#print typeof(freefile())
- LONG
LONG
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: docu about open com must be changed.
You are right FreeBASIC does not use real file handles my fault :-(
you get it only with Declare Function FileAttr ( ByVal filenum As Long, ByVal returntype As Long = 1 ) As Integer
Joshy
you get it only with Declare Function FileAttr ( ByVal filenum As Long, ByVal returntype As Long = 1 ) As Integer
Joshy