locked
Make dll from .exe RRS feed

  • Question

  •  

    I want to convert a windows based application (.exe) into a dll.
    I received "fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h> C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxv_w32.h"
    Then I found out that windows.h is indirectly included through other files like afxtempl.h , afxdisp.h. But I cannot Comment out this directive because it contains classes that are inherited from these files.
    Also there are several other classes in the application with the same problem.
    Tuesday, March 11, 2008 4:11 AM

Answers

  • Hi Mommukhtar ,

     

    There are a possibility you may not be using the correct version of windows in stdafx.h file of your project.

    you use version mentioned below when building for a Windows 2000 or later machine.

    Windows version
    #define _WIN32_WINNT 0x0500 

    #define WINVER 0x0500

    #define _WIN32_WINDOWS 0x0500

     

    or send ur code to me to see the actual senario.
    at:  shiv DOT kushwaha AT hotmail DOT com
     
    regards
    Tuesday, March 11, 2008 6:18 AM