Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8013363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:36:54+00:00 2026-06-04T19:36:54+00:00

I am new to working with DLLs. Though I have done some serious C++

  • 0

I am new to working with DLLs. Though I have done some serious C++ programming on Linux and know what DLLs are. I need to code a windows installer using custom actions. For this I create a new DLL project in Visual studio 2010. When I try to include msi.h in the StdAfx.h file I get the folowing error:

1>------ Build started: Project: CustomAction, Configuration: Debug Win32 ------
1>  DllEntry.cpp
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\msi.h(86): error C2146: syntax error : missing ';' before identifier 'WINAPI'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\msi.h(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\msi.h(86): error C2146: syntax error : missing ';' before identifier 'MsiCloseHandle'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\msi.h(86): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
......................

The project has nothing apart from StdAfx.cpp which Includes the StdAfx Header and the StdAfx.h file which is this:

#include   <msi.h>
#include   <msiquery.h>
#include   <stdio.h>

I tried adding path to the msi.lib in the linker input properties of the project. It didn’t work.
I also tried adding path to the lib folder, include folder and bin folder of the windows sdk directory, that also didn’t work. What is the cause for this and also if anyone can give me pointers to any tutorial to using custom actions with windows installers as I am a newbie in this area.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T19:36:55+00:00Added an answer on June 4, 2026 at 7:36 pm

    It looks like <msi.h> depends on the WINAPI macro. Therefore, you may need to include <windows.h> first:

    #include <windows.h>
    #include <msi.h>
    

    There is nothing special about header files when working with DLLs. Header files work the same way you are already accustomed to.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to working with C# and databases. I need to iterate over
I'm way new to working with XML but just had a need dropped in
I'm relatively new to working with XML and am working with some rather large
I'm fairly new to working with relational databases, but have read a few books
I build some dlls to be used in a big application, and have a
We have a new build machine to start using for our programming team. We
I have a question regarding Shared Objects (or DLLs). I am working on a
I'm working with some, unfortunately largely undocumented, existing code and I'm having trouble understanding
I am new to Qt, and I am working in Windows 7. When I
I have a need to build a website and several DLLs that it references

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.