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

  • Home
  • SEARCH
  • 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 8475111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:48:24+00:00 2026-06-10T17:48:24+00:00

I am trying to compile a Visual Studio / C++ code snippet I have

  • 0

I am trying to compile a Visual Studio / C++ code snippet I have found on the internet containing the function:

Marshal::SizeOf()

When compiling the snippet, I get the error message:

error C2653: 'Marshal' : is not a class or namespace name

so I think I need to include a header file with the definition of this namespace or class, and the SizeOf() function.

When I look up Marshal::SizeOf C++ in Google I find this help page, however on this page there is no information regarding which header file must be included in order to use this function.

Is there a documentation page where one can look up all .NET classes and functions and easily find the C++ header file that must be included in order to use them?

  • 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-10T17:48:26+00:00Added an answer on June 10, 2026 at 5:48 pm

    You need to understand what C++/CLI is. It is a proprietary extension to C++ by Microsoft to make the interfacing between native and managed code (i.e. .Net) easy.

    Marshal is not a C++ class, it’s a C++/CLI class. As such, there’s no header to include. It’s #import you are looking for.

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

Sidebar

Related Questions

I'm trying to compile the code in Visual Studio (2008) and g++. In vs2008
I'm trying to compile some code I downloaded in visual studio. The code was
i am trying to compile this code about arrays and classes in visual studio
I have a C++ Visual Studio project which I'm trying to compile for x86
I Have the Visual Studio C++ 2008 Express Edition. I am trying to compile
Recently I am trying to compile the source code of FFTW in Visual studio
I am just trying to compile a bit bigger project using the Visual Studio
I'm trying to compile an old project that was originally designed for Visual Studio
I stuck while trying to compile qpid c++ with boost 1_47_0 using Visual Studio
I am trying to compile, build and debug 16-bit assembly programs using Visual Studio

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.