call W32 API from MFC app
-
I think it's a simple question yet have not found ANY answers. I would like to call BOOL CopyFileEx( LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); in my MFC app. No luck... what am I missing? Thanks:confused:
-
I think it's a simple question yet have not found ANY answers. I would like to call BOOL CopyFileEx( LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); in my MFC app. No luck... what am I missing? Thanks:confused:
:confused: And your problem is? Does not compile? Compiles but does not work? Blows your machine? eperales
-
I think it's a simple question yet have not found ANY answers. I would like to call BOOL CopyFileEx( LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); in my MFC app. No luck... what am I missing? Thanks:confused:
-
I think it's a simple question yet have not found ANY answers. I would like to call BOOL CopyFileEx( LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); in my MFC app. No luck... what am I missing? Thanks:confused:
MFC is calling Win32 stuff itself, you should be able to call any Win32 function from MFC. What you're missing is an explanation of what is going wrong, but according to MSDN it was introduced in W98, so you probably need a platform SDK installed in order to use it. ( That is to say you DO need it, and I'm guessing it's your problem ). Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
-
I think it's a simple question yet have not found ANY answers. I would like to call BOOL CopyFileEx( LPCWSTR lpExistingFileName, LPCWSTR lpNewFileName, LPPROGRESS_ROUTINE lpProgressRoutine, LPVOID lpData, LPBOOL pbCancel, DWORD dwCopyFlags ); in my MFC app. No luck... what am I missing? Thanks:confused:
If include the "winbase.h" header file the complier complains c:\program files\microsoft sdk\include\wininet.h(297) : error C2146: syntax error : missing ';' before identifier 'dwResult' c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'dwResult' : missing storage-class or type specifiers thanks again
-
If include the "winbase.h" header file the complier complains c:\program files\microsoft sdk\include\wininet.h(297) : error C2146: syntax error : missing ';' before identifier 'dwResult' c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'dwResult' : missing storage-class or type specifiers thanks again
I have Platform SDK installed, and I had similar error, after defining:
#define WIN32_WINDOWS 0x0410
in stdafx.h (before any include) they disappeared eperales -
If include the "winbase.h" header file the complier complains c:\program files\microsoft sdk\include\wininet.h(297) : error C2146: syntax error : missing ';' before identifier 'dwResult' c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft sdk\include\wininet.h(297) : error C2501: 'dwResult' : missing storage-class or type specifiers thanks again
the msdn says: To compile an application that uses this function, define the _WIN32_WINNT macro as 0x0400 or later. maybe Adding it.