General information
Category:
Windows API functions
Title:
How to use CreateFile function
This is my work
#DEFINE GENERIC_READ 0X80000000
#DEFINE GENERIC_WRITE 0X40000000
#DEFINE OPEN_EXISTING 3
#DEFINE FILE_FLAG_OVERLAPPED 0X40000000
Declare WriteFile in kernel32 hFile As integer, lpBuffer As Any, nNumberOfBytesToWrite As integer, lpNumberOfBytesWritten As integer, lpOverlapped As Any) As integer
Declare ReadFile in kernel32 hFile As integer, lpBuffer As Any, nNumberOfBytesToRead As integer, lpNumberOfBytesRead As integer, lpOverlapped As Any) As integer
declare integer CreateFile in kernel32 lpFileName As String, dwDesiredAccess As integer, dwShareMode As integer, lpSecurityAttributes As SECURITY_ATTRIBUTES, dwCreationDisposition As integer, dwFlagsAndAttributes As integer, hTemplateFile As integer
*this does not work
ICDEV=CreateFile('COM1',GENERIC_READ or GENERIC_WRITE,0,null,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,0)
what is wrong?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only