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 7182965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:52:58+00:00 2026-05-28T17:52:58+00:00

we have a C++ Win32 DLL that reads data from Excel. The application uses

  • 0

we have a C++ Win32 DLL that reads data from Excel.

The application uses the following line to create an application:

xl.CreateInstance(L"Excel.Application");

I want to use this DLL on a .NET Project, so I’ve built a C++/CLI Wrapper, and reference the wrapper DLL on a C# Web Application.

Win32 (unmanaged) -> C++/CLI (managed) -> C#

The Web Application works fine on the Visual Studio integrated Web Server, however when I deploy to IIS it fails on the above line and returns the error “Invalid pointer”.

I thought it could be a permissions problem so I impersonated the Web App but it didn’t work. Looks like IIS does not allow open Excel from an unmanaged C++ DLL. I could open from C# but there is a lot of C++ code to read the spreadsheets and I don’t want to write it again.

I am running IIS 7.5 and the applicaiton pool allow Win32 Applications.

Could you help me?

Best regards,

  • 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-05-28T17:52:59+00:00Added an answer on May 28, 2026 at 5:52 pm

    Using Office Interop on the server is NOT supported by MS – see http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

    Since Windows Vista MS introduced several security-related measures which prevent a Windows Service (IIS is just a special case of that) from doing “desktop-like” things… which means you would have to circumvent several security measures (impersonation alone won’t cut it!) to get it to work (NOT recommended!).

    The Integrated VS web server does NOT simulate the behaviour of IIS regarding permissions etc.

    To deal with Excel in a server-scenario there are several options (free and commercial) out there:

    I can recommend Aspose.Cells and Flexcel… didn’t try SpreadsheetGear but hear+read lots of good things about it…

    Free options (though for the newer xlsx format only!) are for example OpenXML 2 from MS and EPPlus.

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

Sidebar

Related Questions

We have a command line application that could benefit from a GUI. We want
I have a third-party (Win32) DLL, written in C, that exposes the following interface:
I have a Win32 application that includes an EXE, an ActiveX control (DLL) and
I have a .NET application that makes calls to a native Win32 DLL using
I have successfully implemented interop beftween Win32 application and managed .Net dll as described
We have a Win32 application that hosts the .NET runtime and opens up .NET
I've got a DLL that I've created as a C++ Win32 application. To prevent
I have a win32 library (DLL) project that was originally written in Delphi. It
I have a C# project consisting of stored procedures that reference a win32 dll
I have disassembled a VB6 application that calls a function in a DLL library,

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.