0

I'm having trouble compiling an old MFC WIN CE embedded project in windows 7 visual studio 2010. I believe the old application was compiled in embedded Visual Studio 4 and needed mfcce211.dll.

Any who, all of the source files manage to compile fine but I’m getting the following linker error:

error LNK2019: unresolved external symbol _VirtualCopy referenced in function "public: static void __cdecl CTX3922::Initialise(void)" (?Initialise@CTX3922@@SAXXZ)

VirtualCopy is being called in CTX3922::Initialise which is in the file TX3922.cpp and holds:

extern "C" {
              BOOL VirtualCopy(LPVOID lpvDest, LPVOID lpvSrc, DWORD cbSize, DWORD fdwProtect);
           }

Project properties are:

  • Use MFC in a Shared DLL
  • Not Using ATL
  • No Common Language Runtime Support

Enabling /NODEFAULTLIB throws A LOT of linker errors including this one.

I can't find the declaration of VirtualCopy anywhere

I am missing a library, if so, Is there anyway of finding out which one?

Many Thanks

  • Did you link against Coredll.lib as specified in the [documentation](https://msdn.microsoft.com/en-us/library/aa450977.aspx) ? For which platform are you compiling with VS2010 ? I'm not sure VS2010 can cross compile for WIN CE. – Jabberwocky Apr 24 '15 at 12:46
  • Thanks, How do i find this out? The preprocessor option indicates WIN32, the $(OS) macro hold windows_NT, the orginal project folder say eVC 3/4 project. –  Apr 24 '15 at 13:23
  • I found it out just as you could have found it out by reading the [documentation of VirtualCopy](https://msdn.microsoft.com/en-us/library/aa450977.aspx). `unresolved external symbol` indicates most of the time that some library is missing. – Jabberwocky Apr 24 '15 at 13:42

1 Answers1

0

VirtualCopy is a Win CE call used to copy physical memory into virtual given a memory address and is not available in win32. this type of call cannot be done in a standard c++ usermode app. I will most likey need a device driver. Thanks