Thank's again both
A nice piece of code, I hope to understand it soon, let me read about modules and will try some things.
I'm not a programmer, ellectronics is my area, I like software and I read an play mostly with Pascal (3.0 .. 6.0)
I read some C (djgpp) and assembler 8086 (I work with microcontrollers). Basic of course. For a year in my free times i'm learning Blitz3D for a project I supose some day will finish.
I write some thing's enterely by instinct.
Starting with the definitions I saw in DLPORTIO and the one's you sent me, I try to write some thing like your's, but I find that the string definition:
At first I receive an error when I call that function, then I saw that the definition start with "apiCreateFile" and end with "CreateFileA" I decide to declare:
I didn't get an error
when the compiler doesn't recongnize the "*"
I defined the pointers as Byte Ptr, and I reveive no error message
so
I rewrite the functions in SERIALIO.BB the way I think they should work (FREEBANK doesn't exists but seems thah BlitzMax is intelligent enaugh to free all the things one leave with out use!??)
but CreateFile doesn't seems to work properly, didn`t return other value than -1 (having a port free in my machine).
I put Varptr nameVar whenever shoul be a pointer but still doesn' wor, really I don't know why!
Thank's again
A nice piece of code, I hope to understand it soon, let me read about modules and will try some things.
I'm not a programmer, ellectronics is my area, I like software and I read an play mostly with Pascal (3.0 .. 6.0)
I read some C (djgpp) and assembler 8086 (I work with microcontrollers). Basic of course. For a year in my free times i'm learning Blitz3D for a project I supose some day will finish.
I write some thing's enterely by instinct.
Starting with the definitions I saw in DLPORTIO and the one's you sent me, I try to write some thing like your's, but I find that the string definition:
apiCreateFile:Int(lpFileName:String, dwDesiredAccess:Int, dwShareMode:Int, lpSecurrityAttributes:Int, dwCreationDistribution:Int, dwFlagsAndAttributes:Int, hTemplateFile:Int) = "CreateFileA"
At first I receive an error when I call that function, then I saw that the definition start with "apiCreateFile" and end with "CreateFileA" I decide to declare:
global apiCreateFile:Int(lpFileName:String, dwDesiredAccess:Int, dwShareMode:Int, lpSecurrityAttributes:Int, dwCreationDistribution:Int, dwFlagsAndAttributes:Int, hTemplateFile:Int)"Win32"=GetProcAddress(DllHandle,"CreateFileA")
I didn't get an error
when the compiler doesn't recongnize the "*"
I defined the pointers as Byte Ptr, and I reveive no error message
so
I rewrite the functions in SERIALIO.BB the way I think they should work (FREEBANK doesn't exists but seems thah BlitzMax is intelligent enaugh to free all the things one leave with out use!??)
but CreateFile doesn't seems to work properly, didn`t return other value than -1 (having a port free in my machine).
I put Varptr nameVar whenever shoul be a pointer but still doesn' wor, really I don't know why!
Thank's again