Hi Bernhard, first, I should state that programming is not my long
suit, I am a hardware person who has had to use programming to talk
to hardware. I just learn enough to get the job in hand done, then
drift on to the next project, and rapidly forget the last.
As well as I can remember, I have not seen that "file" construct used
for RS232 in VB. It is a useful way of doing things, in some
situations. It could possibly be coded in VB, I just don't think I
have ever seen it done that way. It would still require a good grasp
of RS232 programming to implement. I don't think the parameters
available in the "file" functions extend to comms ports.
BTW, if you add "pointer" after "file" in your file definition, I
would agree. The file GOES INTO the memory area following the address
of the FILE POINTER.
The only VB book I have found to be of ANY assistance with RS232
is "VB.NET in a Nutshell". Much of the content is backwards
compatible with VB6, I gave up on .net. Nor do I remember seeing
any "fileopen" type constructs that pertained to anything other than
a disk file!
There is a lot of RS232 information available in the MSDN library,
both on the CD set or the MS web site, if you do not have the CDs.
Perhaps some of the third party add-on .dll or .ocx offerings would
give you the file construct you want, there are some that make RS232
a real doddle, but I have never bought or even tested any of them. I
would like to see the source code for them, but! I think some offer a
free download trial version, but not the source code, naturally.
As I said, the quickest way to learn, is download and "play" with
several examples of source code that do something like what you need
to have done, chop and change, mix and match, until you have what you
want. (Well, that may be a better recipe for getting a job done, than
for learning. But the best way of learning is doing, nah?)
Why not get some RS232 source code, and attempt to mix it with your
fileopen source?
cheers, Ken.
--- In visualbasic6programming%40yahoogroups.com">visualbasic6programming
yahoogroups.com, "bernhard"
<baernibaer
...> wrote:
>
> --- In visualbasic6programming%40yahoogroups.com">visualbasic6programming
yahoogroups.com, "kengoldy"
> <kengoldy
> wrote:
> >
> > Hello Bernhard,
> > ...
> > is the beginning of a procedure to open a file, as
> > in a disk file. That file could be used to store data downloaded
by
> > RS232 comms., but of itself it has nothing to do with RS232.
> > ...
> > cheers, Ken.
> >
> >
> Hello Ken,
> thanks for Your help and i even have a VB book (but no rs232
> explanation in it) ;)
> Furthermore i think different for the above sentence.
> From my sight of view a file is a cpu or memory address, which
could
> be accessed through a variable. If i want to send information from
a
> program (address 1) to another location (address 2) i choose this
> variable as printer output, disk file or Com-Port. Therefore it
could
> be helpful i think, if i could use CreateFile (like (c sample)
hFile
> = CreateFileA("file.txt", 0x40000000 | 0x80000000, 0, 0, 2, 0, 0);
> for files or hCom = CreateFileA("COM1", 0x40000000 | 0x80000000, 0,
> 0, 2, 0, 0); for RS232 Port) as "multiTargetFunction" in VB too.
> Would this be a helpful simplification?
> thanks for reading
> regards bernhard
>
.