Calls for Backup Application
Posted on 1997-05-09
I am using VB4(32) under WIndows NT and am trying to create a backup program which will be able to access files which are constantly in use and back them up. (ie a MS Access database)
I have gathered that BackupRead and BackupWrite should be called from the "kernel32" library, and that files should be opened with backup program access. What I am having trouble with is DLL calling conventions:
How do I pass NULL to a DLL call? I need to pass NULL where a LONG variable should be to achieve specific results, but I cannot simply say VARIABLE& = NULL then pass it, or I get an "Invalid use of Null" error on compile.
Also, what structure should I pass to ReadFile? I tried passing an array of type Byte, but I received errors when trying to compile.
Buffer(bSize) As Byte didn't seem to work. Can someone post a sample of how to use ReadFile then WriteFile from VB, using a structure to store the Read data?
(I should be able to figure out how to use BackupRead and BackupWrite from there)
Thanks a lot,