VB6 RANDOM FILES USING SHARED

BIAPRO
BIAPRO used Ask the Experts™
on
One pc in network must write to a random file, on a shared map ,   to a specific record nummer one string in a field  without closing the file it will do that on a event or command  , thus update that record with new string
Other Pc must open that file, keeps it open, and reads every 2 second that record, if string has value
it will read it and sets record to zero spaces and update file
How  to do this without conflict ???
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
ste5anSenior Developer

Commented:
What is you actual use-case? Why using files instead of a database or a message queue? Why polling?

Author

Commented:
well there is reason for,  I have on a Touch Pc a USB barcode scanner , running a there program that writes to file the scanned bardode
the share is on Vmware
the touch pc runs a VB exe by RDP on the host
the exe looks by timer for record to see if it has a barcode value, if so prints label set record to zero got filled with new barcode (if)
Now we do that by writing a ascii file on Touch,    host looks by timer if file exist. if so opens file , read data,  kills file
works ok, but slow  !!!   5 seconds for a run , we scan by 2 seconds
thus trying to get faster by random file  i  hope

Author

Commented:
evering runs in VB6 pro compiled,  Vmware server met Windows 10 host,  On Pc  to RDP host  there also VB6 compiled
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

ste5anSenior Developer

Commented:
[..] I have on a Touch Pc a USB barcode scanner , running a there program that writes to file the scanned barcode [..]  the touch pc runs a VB exe by RDP on the host [..]
You're mentioning two programs. You've written both? In this case you should I would use either named pipes or TCP/IP for telling the other program what to do.
Waiting for semaphore files isn't a fast task per se, cause it requires writing and reading from the IO subsystem, which is the slowest medium for inter-process communication (IPC).

And the other question is: Can you use a database? Cause writing your print jobs to a database would be much more reliable and it would give you an audit trail for free.

Author

Commented:
hello,  yes we write all programs by our selves  VB6 pro   this spounds interesting, unknown to me, could you please  explain?   sample  vbr6 ?

this message i mean:  named pipes or TCP/IP for telling the other program what to do.
Senior Developer
Commented:
I guess TCP/IP is the simpler one. See this winsocks sample.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial