473,799 Members | 2,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML documentation in unmanaged C++

I thought I read somewhere in the MS documentation that XML documentation is
compiled in C++, but the C++ code editor obviously doesn't do anything
interesting when I enter "///". What's the deal with C++ and XML docs? Is
there an add-in available to help with entering XML docs?

TIA - Bob
Oct 27 '06 #1
5 8558
Hi Bob,

The VC2005 compiler supports the XML documentation comment, it could
generate the XML file from your code comments (which are prefixed by
'///')). But it would not support the "on-the-fly" XML comments. You need
to compile it and then it should support it. Please refer to the following
blog article for the details:

http://blogs.msdn.com/peterhu/archiv...05/126767.aspx

"Support for XML doc comments: we now support XML doc comments in compiled
files. The compiler outputs an .xdc file which contains the documentation
information fragments. There's a new tool called xdcmake which takes these
fragments and produces the final .xml comments file. This tool is
integrated into the IDE, so producing doc comments is as simple as enabling
the /doc switch in the compiler's property pages (the xdcmake tool
automatically runs when the compiler outputs .xdc files). In addition,
IntelliSense will support these xml comment files. "

I suggest you can also refer to the related MSDN documentation for the
usage of XML documentation comment in VC2005:

XML Documentation (Visual C++)
http://msdn2.microsoft.com/en-us/library/ms177226.aspx

doc (Process Documentation Comments) (C/C++)
http://msdn2.microsoft.com/en-us/library/ms173501.aspx

XML Document Generator Tool Property Pages
http://msdn2.microsoft.com/en-us/library/ms235515.aspx

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.

Thansk!

Best regards,

Gary Chang
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 30 '06 #2
Hi Gary,

Based on the articles you referred me to, it's clear that the C++ compiler
will process XML documentation. But what about tools to help me create the
documentation in the code editor? In VB and C#, the code editor and
intellisense help me to correctly create XML documentation. But the C++
code editor seems to just ignore "///". Am I missing something?

- Bob
Nov 3 '06 #3
Hi Bob,

Just as I suggested in my last post, add the /doc compiler option to your
project compilier options:

To set this compiler option in the Visual Studio development environment:

1. Open the project's Property Pages dialog box.

2. Expand the Configuration Properties node.

3. Expand the C/C++ node.

4. Select the Output Files property page.

5. Modify the Generate XML Documentation Files property.

Then after the building process, the XML comment file should be generated
in the location which you specified in the 'Output Document File' entry of
the 'XML Document Generator Tool Property Pages'
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 6 '06 #4
Gary,

/doc only helps if there is XML documentation in the source code to begin
with. My original question was whether or not the IDE (the C++ code editor
and C++ intellisense) will give me any help with authoring XML documentation
the same way VB and C# do. Lacking built-in support in the VS 2005 IDE, is
there a plug-in that any readers of this NG can point me to that provides
contextual editing help for XML documentation in C++ source code.

- Bob

""Gary Chang[MSFT]"" <v-******@online.m icrosoft.comwro te in message
news:%2******** ********@TK2MSF TNGXA01.phx.gbl ...
Hi Bob,

Just as I suggested in my last post, add the /doc compiler option to your
project compilier options:

To set this compiler option in the Visual Studio development environment:

1. Open the project's Property Pages dialog box.

2. Expand the Configuration Properties node.

3. Expand the C/C++ node.

4. Select the Output Files property page.

5. Modify the Generate XML Documentation Files property.

Then after the building process, the XML comment file should be generated
in the location which you specified in the 'Output Document File' entry of
the 'XML Document Generator Tool Property Pages'
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

Nov 9 '06 #5
Hi Bob,
>My original question was whether or not the IDE (the C++ code
editor and C++ intellisense) will give me any help with authoring
XML documentation the same way VB and C# do
Sorry for misunderstandin g your questions. I am afraid the VC2005 editor is
unlike the C# and VB.NET editor, it only provides some limited intellisence
after the source code have beed compiled.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
741
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a managed point-of-view I've noticed that: 1) for each managed and unmanaged C function (not C++ classes) I get a public managed static method (defined on a 'Global Functions' class) in the generated assembly with an export name of the form...
4
40039
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that deals with managed in one place, and code that deals with unmanaged in another place, but I can't seem to find anything that clearly explains what that means. I think if I used a Windows API function to optain a handle, that handle would be an...
1
1656
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the code which works well. I understand the basic concept: our code is unmanaged, Windows Forms is Managed and Unmanaged may not call Managed code. I read about Wrappers, PInvoke, Runtime Callable Wrappers for COM and about It just
6
1315
by: marek | last post by:
Hello All, we are doing a quite a big project that contains at the lowest level an unmenaged c++ classes. Above it there are managed wrappers and at the top there are ASP.NET pages. Can anyone tell me how to force ASP.NET not to "clear" or reinitialize unmenaged global or static variables that are set on unmanaged level between successive requests?
6
4131
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including memory management and connection pooling constructs) as static variables which were intended to scoped to the process. 2. Managed C++ assemblies (.NET 1.1) that wrap the unmanaged DLLs as nice neat classes with managed interfaces.
9
3123
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for this, I want to use it. Is it possible to call Managed class functions from Unmanaged class? How to do it? I did something like this. I declared a managed class (in C++ CLI) called as MyManagedClass whose
5
1913
by: akash | last post by:
I'm having problems calling an unmanaged class from a managed wrapper. I suspect I'm missing something obvious, as I'm unfamiliar with C++ and classes are very simple. My unmanaged class is as follows: // Unmanaged.h #pragma once namespace Unmanaged { class __declspec(dllexport) UnmanagedClass { // TODO: Add your methods for this class here.
4
1767
by: Can | last post by:
From the MSN documentation; "By default, /CLRUNMANAGEDCODECHECK is in effect, which means SuppressUnmanagedCodeSecurityAttribute is applied to linker-generated PInvoke calls. Specify /CLRUNMANAGEDCODECHECK:NO to not apply this attribute." But it seems it's just the opposite (which sounds more logical). By default no SuppressUnmanagedCodeSecurityAttribute is applied to the C++ interop calls. And /CLRUNMANAGEDCODECHECK:NO must be...
2
12362
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the classes in managed C++ as a wrapper to the unmanaged C++ classes or is there an easier way? Essentially what I have done is written a C++ kernel mode driver and I want to use it from my C# program. Because it requires some setup outside the...
0
10475
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.