[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Hi Is there a winbase.h available for TinyCC that inc
From: |
Timo Lähde |
Subject: |
Re: [Tinycc-devel] Hi Is there a winbase.h available for TinyCC that includes function ReplaceFile ? |
Date: |
Wed, 25 Aug 2010 17:05:52 +0300 |
Hello Ed!
tcc.exe can compile this:
------------------------------------------------------------
#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
);
}
------------------------------------------------------------
-- Timppa
2010/8/25 ED GROSSHEIM <address@hidden>:
> 8-04 am 08-25-10
>
> Hi,
>
> I would like to be able to build a source file that includes a call to the
> function ReplaceFile(). It compiles in PellesC.
>
> In the winbase.h for Pelles, I see:
> #if (_WIN32_WINNT >= 0x0500)
> #define REPLACEFILE_WRITE_THROUGH 0x00000001
> #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
> #define ReplaceFile ReplaceFileA
> WINBASEAPI BOOL WINAPI
> ReplaceFileA(LPCSTR,LPCSTR,LPCSTR,DWORD,LPVOID,LPVOID);
>
>
> Similar is the way winbase.h is setup in the MinGW header.
>
> If I try to use the MinGW header, of course I get a file type error.
>
> Have I hit a brick wall ?
>
> Thanks,
> Ed
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
>