Copying files, changing attributes (CW20) 
Author Message
 Copying files, changing attributes (CW20)

The sample program from John (SilverGhost) works great in 32-bit. I tried
changing the program to 16-bit but I get this message:

SETFILEATTRIBUTES is unresolved in file copyfile.obj
COPYFILE is unresolved in file copyfile.obj

where copyfile.obj is the name of the executable.

I tried reading the Programer's Guide API and  inserted the lines:

I also tried getting information from on copyfile 16-bit but
did not find any.

As you can tell I don't know much about calling APIs but it seems that I need
the name of the DLL or OBJ file that contains the CopyFile and
SetfileAttributes functions and link it. I would like to use these functions in
16-bit and learn more about other available API functions.

Any additional help/pointers is greatly appreciated.

>Hi Jvarela,
>This clw file will show the functions in 32 bit only
>If you want to use it in 16 bit, remove the A from
>CopyFileA &? SetFileAttributesA
>Hope this helps


>?? INCLUDE('Equates.CLW')
>?? INCLUDE('TplEqu.CLW')
>?? INCLUDE('Keycodes.CLW')
>?? INCLUDE('Errors.CLW')
>?? MAP
>???? MODULE('')
>???????? CopyFileA(*CSTRING,*CSTRING,BOOL),BOOL,Pascal,RAW
>???????? SetFileAttributesA(*CSTRING,ULONG),BOOL,PASCAL,RAW
>???? END
>?? END
>Window WINDOW('Testfiles'),AT(,,185,92),FONT('MS Sans


- Show quoted text -

>???? END
>?? CODE
>?? END


>> I would like to know how to copy files and change file attributes without
>> the RUN command. I recently got a reply telling me that there was an API
>that I
>> could use but I have not been able to get more information on it. Do I need
>> buy additional software to be able to use APIs? Is there information that
>> the functions available on APIs or how to use them?
>> Any help is appreciated.

Tue, 04 Jun 2002 03:00:00 GMT  
 Copying files, changing attributes (CW20)

> SETFILEATTRIBUTES is unresolved in file copyfile.obj
> COPYFILE is unresolved in file copyfile.obj

these api's are 32 bit only - not found in 16 bit. In 16 bit there is a
c language runtime function called _chmod that can set some attributes.
For copy file you need to write your own based on _lopen, _lRead,
_lwrite, _lclose and a little loop.
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!

Tue, 04 Jun 2002 03:00:00 GMT  
 Copying files, changing attributes (CW20)
Thank you Jim. I'll try the chmod.

Fri, 07 Jun 2002 03:00:00 GMT  
 [ 3 post ] 

 Relevant Pages 

1. Copying files, changing attributes (CW20)

2. Copying files / changing attributes (CW20)

3. Copying files and changing attributes (cw20)

4. CW2.003 File copy changes the date.....need a way to copy w/o date change

5. Setting file attributes and Copying files

6. CW2.003 Copy file changes file date

7. Changing file attributes at runtime

8. C4 ABC - Change of file attribute

9. CW20 List Boxes w/ Mark Attribute

10. Change File Attributes

11. CW20: Printing Mutiple Copies of a Report

12. Copy file without date change.


Powered by phpBB® Forum Software