Loading ...
Sorry, an error occurred while loading the content.

re: Error in atlwince.h

Expand Messages
  • jdx797
    Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is supposed to preview the video from the webcam. However
    Message 1 of 3 , Oct 3, 2009
    • 0 Attachment
      Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is supposed to preview the video from the webcam. However there is something wrong when I link it with the directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with <streams.h>, not too sure about that.

      Warning 1 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
      Warning 2 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
      Warning 3 warning C4003: not enough actual parameters for macro 'SelectPen' C:\WTL81_9127\Include\atlwince.h 315 VoWifi
      Error 4 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
      Error 5 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 289 VoWifi
      Error 6 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
      Error 7 error C2039: 'CPenHandle' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
      Error 8 error C2146: syntax error : missing ';' before identifier 'penOld' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
      Error 9 error C2039: 'penOld' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
      Error 10 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
      Error 11 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 315 VoWifi

      my stdafx.h

      #pragma once

      // Change this value to use different versions
      #define WINVER 0x0420
      #include <atlbase.h>
      #if _ATL_VER == 0x900
      #define _SECURE_ATL 1
      #endif
      #include <atlstr.h>

      #define _WTL_NO_CSTRING
      #include <atlapp.h>

      extern CAppModule _Module;

      #include <atlwin.h>

      #include <tpcshell.h>
      #include <aygshell.h>
      #pragma comment(lib, "aygshell.lib")

      #include <altcecrt.h>

      // TODO: reference additional headers your program requires here
      #include <winbase.h>

      #include <streams.h>
      //#include <dmodshow.h>
      #include <dmoreg.h>
      //#include <wmcodecids.h>

      #include <objbase.h>
      //#include "struct.h"
      #include "CPropertyBag.h"
      #include "CamServer.h" //my main header file for directshow engine

      Please advise me thanks, any help would be appreciated!
    • Alain Rist
      Hi, If you #include first (following #defineWINVER 0x0420) you should get rid of these errors: atlbase.h and atlwin.h undefine some poorly named
      Message 2 of 3 , Oct 5, 2009
      • 0 Attachment
        Hi,

        If you #include <streams.h> first (following #defineWINVER 0x0420) you should get rid of these errors: atlbase.h and atlwin.h undefine some poorly named macros defined in the files included by streams.h.

        cheers,
        AR


        ----- Original Message -----
        From: jdx797
        To: wtl@yahoogroups.com
        Sent: Sunday, October 04, 2009 6:25 AM
        Subject: [wtl] re: Error in atlwince.h


        Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is supposed to preview the video from the webcam. However there is something wrong when I link it with the directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with <streams.h>, not too sure about that.

        Warning 1 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
        Warning 2 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
        Warning 3 warning C4003: not enough actual parameters for macro 'SelectPen' C:\WTL81_9127\Include\atlwince.h 315 VoWifi
        Error 4 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
        Error 5 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 289 VoWifi
        Error 6 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
        Error 7 error C2039: 'CPenHandle' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
        Error 8 error C2146: syntax error : missing ';' before identifier 'penOld' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
        Error 9 error C2039: 'penOld' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
        Error 10 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
        Error 11 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 315 VoWifi

        my stdafx.h

        #pragma once

        // Change this value to use different versions
        #define WINVER 0x0420
        #include <atlbase.h>
        #if _ATL_VER == 0x900
        #define _SECURE_ATL 1
        #endif
        #include <atlstr.h>

        #define _WTL_NO_CSTRING
        #include <atlapp.h>

        extern CAppModule _Module;

        #include <atlwin.h>

        #include <tpcshell.h>
        #include <aygshell.h>
        #pragma comment(lib, "aygshell.lib")

        #include <altcecrt.h>

        // TODO: reference additional headers your program requires here
        #include <winbase.h>

        #include <streams.h>
        //#include <dmodshow.h>
        #include <dmoreg.h>
        //#include <wmcodecids.h>

        #include <objbase.h>
        //#include "struct.h"
        #include "CPropertyBag.h"
        #include "CamServer.h" //my main header file for directshow engine

        Please advise me thanks, any help would be appreciated!





        [Non-text portions of this message have been removed]
      • jdx797
        Hi AR, your solution works by include first! Thanks alot!! Best Regards, Jordan
        Message 3 of 3 , Oct 11, 2009
        • 0 Attachment
          Hi AR,

          your solution works by include <streams.h> first! Thanks alot!!

          Best Regards,

          Jordan

          --- In wtl@yahoogroups.com, "Alain Rist" <ar@...> wrote:
          >
          > Hi,
          >
          > If you #include <streams.h> first (following #defineWINVER 0x0420) you should get rid of these errors: atlbase.h and atlwin.h undefine some poorly named macros defined in the files included by streams.h.
          >
          > cheers,
          > AR
          >
          >
          > ----- Original Message -----
          > From: jdx797
          > To: wtl@yahoogroups.com
          > Sent: Sunday, October 04, 2009 6:25 AM
          > Subject: [wtl] re: Error in atlwince.h
          >
          >
          > Hi all, I am creating a WTL mobile project, my purpose is to link it with a C++ directshow engine. It is supposed to preview the video from the webcam. However there is something wrong when I link it with the directshow engine, I have included my stdafx.h code and my errors below. I suspect it clashes with <streams.h>, not too sure about that.
          >
          > Warning 1 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
          > Warning 2 warning C4003: not enough actual parameters for macro 'SelectFont' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
          > Warning 3 warning C4003: not enough actual parameters for macro 'SelectPen' C:\WTL81_9127\Include\atlwince.h 315 VoWifi
          > Error 4 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 288 VoWifi
          > Error 5 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 289 VoWifi
          > Error 6 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 302 VoWifi
          > Error 7 error C2039: 'CPenHandle' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
          > Error 8 error C2146: syntax error : missing ';' before identifier 'penOld' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
          > Error 9 error C2039: 'penOld' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
          > Error 10 error C2039: 'dc' : is not a member of 'WTL::CPaintDC' C:\WTL81_9127\Include\atlwince.h 305 VoWifi
          > Error 11 error C2059: syntax error : '(' C:\WTL81_9127\Include\atlwince.h 315 VoWifi
          >
          > my stdafx.h
          >
          > #pragma once
          >
          > // Change this value to use different versions
          > #define WINVER 0x0420
          > #include <atlbase.h>
          > #if _ATL_VER == 0x900
          > #define _SECURE_ATL 1
          > #endif
          > #include <atlstr.h>
          >
          > #define _WTL_NO_CSTRING
          > #include <atlapp.h>
          >
          > extern CAppModule _Module;
          >
          > #include <atlwin.h>
          >
          > #include <tpcshell.h>
          > #include <aygshell.h>
          > #pragma comment(lib, "aygshell.lib")
          >
          > #include <altcecrt.h>
          >
          > // TODO: reference additional headers your program requires here
          > #include <winbase.h>
          >
          > #include <streams.h>
          > //#include <dmodshow.h>
          > #include <dmoreg.h>
          > //#include <wmcodecids.h>
          >
          > #include <objbase.h>
          > //#include "struct.h"
          > #include "CPropertyBag.h"
          > #include "CamServer.h" //my main header file for directshow engine
          >
          > Please advise me thanks, any help would be appreciated!
          >
          >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.