tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Re: Vol 88 Hi Is there a winbase.h available for TinyCC t


From: ED GROSSHEIM
Subject: [Tinycc-devel] Re: Vol 88 Hi Is there a winbase.h available for TinyCC that includes function ReplaceFile ? Timo
Date: Wed, 25 Aug 2010 15:22:23 -0700 (PDT)


Hi Timo !

  Well I am wondering if I need a header file update.

Running your code:

 

// // ~ •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •
#define _WIN32_WINNT 0x0500
#define WIN32_LEAN_AND_MEAN
#include <windows.h>


WINBASEAPI WINBOOL WINAPI ReplaceFileA(
         LPCSTR lpReplacedFileName,
         LPCSTR lpReplacementFileName,
         LPCSTR lpBackupFileName,
         DWORD dwReplaceFlags,
         LPVOID lpExclude,
         LPVOID lpReserved);


LPCSTR lpReplacedFileName = "file0.txt";
LPCSTR lpReplacementFileName = "file1.txt";
LPCSTR lpBackupFileName = "file2.txt";

void test(void) {
    BOOL test = ReplaceFile(
              lpReplacedFileName,
              lpReplacementFileName,
              //lpBackupFileName,
              NULL,
              REPLACEFILE_WRITE_THROUGH | REPLACEFILE_IGNORE_MERGE_ERRORS,
              NULL,
              NULL
              );
}
// // ~ •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •  •

 

    I am getting the same error I first got when I tried to compile my file with the ReplaceFile Call:

 

Timo Win32_Lean_and_Mean and ReplaceFile.c:26: 'REPLACEFILE_WRITE_THROUGH' undeclared.

 

  After I first saw this, I did a search of all header files in TCC and found that "'REPLACEFILE_WRITE_THROUGH" is not in any TCC header file. Then I searched for ReplaceFile, and found it was not anywhere either.

 

Searching the Pelles header files I found everything in winbase.h.

TCC's winbase.h does not have the prototype or defines.

 

   So I am wondering why the above file builds for you?

 

   I am using "tcc-0.9.25"

 

   One reason I had for asking (because the Remove(), and Rename() getaround does work) ..... was to see if I could put the prototype and defines in my main source file instead..... and getaround the missing info in winbase.h.

 

   Am I doing something wrong?

 

   Thanks, Ed



From: "address@hidden" <address@hidden>
To: address@hidden
Sent: Wed, August 25, 2010 11:01:01 AM
Subject: Tinycc-devel Digest, Vol 88, Issue 18

Note: Forwarded message is attached.

Send Tinycc-devel mailing list submissions to
    address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.nongnu.org/mailman/listinfo/tinycc-devel
or, via email, send a message with subject or body 'help' to
    address@hidden

You can reach the person managing the list at
    address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tinycc-devel digest..."
Today's Topics:

  1. IRC (Matt Davis)
  2. Hi Is there a winbase.h available for TinyCC that    includes
      function ReplaceFile ? (ED GROSSHEIM)
  3. Re: Hi Is there a winbase.h available for TinyCC that
      includes function ReplaceFile ? (Timo L?hde)
_______________________________________________
Tinycc-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/tinycc-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]