Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. how to solve the problem occured due to using setupapi.h and Dbt.h header files in my windows service application.. in windows XP and VC++.Net 2005

how to solve the problem occured due to using setupapi.h and Dbt.h header files in my windows service application.. in windows XP and VC++.Net 2005

Scheduled Pinned Locked Moved Managed C++/CLI
csharpc++helpvisual-studiodebugging
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anumadhu
    wrote on last edited by
    #1

    hello, I created a win32 project(precompiled headers, console application). This was created to create a service( for which i used SERVICE_TABLE_ENTRY, SERVICE_STATUS, SERVICE_STATUS_HANDLE, etc... required structures and methods). Environment used: Windows XP, VC++.Net2005. Should work on: I want to make this exe to run on windows 95,98, XP, 2000 and Vista. my stdafx.h file contains: #pragma once #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include // TODO: reference additional headers your program requires here #pragma warning (disable:4430)//... i added this, since i was getting this error. and in msdn this //was given as its solution. To this project, i have added two more files: 1) USBActivity.h 2) USBActivity.cpp In USBActivity.cpp the hierarchy of headers included is as follows: #include "stdafx.h" #include #include "stdio.h" #include #include #include "afxcmn.h" #include "cfgmgr32.h" #include "Blowfish_Data_FileEncrpt.h" #include "USBActivity.h" The project properties are set as: Use windows Standard libraries, WIN32;_DEBUG;_CONSOLE as preprocessor definitions, Basic Run-TimeChks: Both (/RTC1, equiv. to /RTCsu) , RunTime-Library --> Multi-threaded Debug (/MTd), Use Precompiled Header (/Yu), Linker+AdditionalDependencies-->setupapi.lib. I am getting following build errors: Compiling... stdafx.cpp Compiling... Blowfish_Data_FileEncrpt.cpp DataSentinelService.cpp d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT' d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation DoubleBuffering.cpp SHA.cpp USBActivity.cpp d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT' d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier d:\micr

    P 1 Reply Last reply
    0
    • A anumadhu

      hello, I created a win32 project(precompiled headers, console application). This was created to create a service( for which i used SERVICE_TABLE_ENTRY, SERVICE_STATUS, SERVICE_STATUS_HANDLE, etc... required structures and methods). Environment used: Windows XP, VC++.Net2005. Should work on: I want to make this exe to run on windows 95,98, XP, 2000 and Vista. my stdafx.h file contains: #pragma once #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include // TODO: reference additional headers your program requires here #pragma warning (disable:4430)//... i added this, since i was getting this error. and in msdn this //was given as its solution. To this project, i have added two more files: 1) USBActivity.h 2) USBActivity.cpp In USBActivity.cpp the hierarchy of headers included is as follows: #include "stdafx.h" #include #include "stdio.h" #include #include #include "afxcmn.h" #include "cfgmgr32.h" #include "Blowfish_Data_FileEncrpt.h" #include "USBActivity.h" The project properties are set as: Use windows Standard libraries, WIN32;_DEBUG;_CONSOLE as preprocessor definitions, Basic Run-TimeChks: Both (/RTC1, equiv. to /RTCsu) , RunTime-Library --> Multi-threaded Debug (/MTd), Use Precompiled Header (/Yu), Linker+AdditionalDependencies-->setupapi.lib. I am getting following build errors: Compiling... stdafx.cpp Compiling... Blowfish_Data_FileEncrpt.cpp DataSentinelService.cpp d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT' d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation DoubleBuffering.cpp SHA.cpp USBActivity.cpp d:\microsoft visual studio 8\vc\platformsdk\include\commctrl.h(29) : error C2146: syntax error : missing ';' before identifier 'HRESULT' d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier d:\microsoft visual studio 8\vc\platformsdk\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier d:\micr

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      This question is no where related to CLI and you have already asked it in VC++[^] forum. So dont cross-post and choose correct forum.

      Prasad Notifier using ATL | Operator new[],delete[][^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups