NerdyHearn
Home
Blog

Contact
Mailing List

Software

Active Directory Products
Object Compare
Permission Compare

IPhone Products
Calls To Calendar
SMS To CSV
SMS To Gmail
Voicemail To Gmail

Sites
DocuTerminal
How Long For Me
My Music To Me
SaveMySerials
TypeCount

Blog
Twitter

NerdyHearn - Blog


<< Back To All Blogs

A quick way to find C++ method signatures for C# Interop

Saturday, January 10th, 2009

A common problem while dealing with C# interop with C++ is that you have to go through a number of different (sometimes seemingly unlimited) include directives in order to find the struct, enum, or function signature that you are looking for. A quick trick to get them all into a single file for easy searching is to include all of the original base header files you need in a single file, such as the following:

#include
#include
#include

Save this as a file such as temp.cpp.

Open your Visual Studio command prompt and go to the directory where temp.cpp is located and type the following command:

cl /E temp.cpp > myoutput.txt

You can then open myoutput.txt, and it will include ALL of the signatures from all of the included header files (including children includes, aka recursively).

You can also change the /E switch to /EP to remove the line number declarations.

C++in' Tom Out.

Tags

CSharp CPP

Related Blogs

Generic Method for Loading Interfaces in C# (For a Plugin System)
Creating an Organizational Chart using C#: Part 2
Good Ol Cross-Threaded Socket Action
Reading an XML file using LINQ
ASP.NET Best Practices

Comments

Currently no comments.

Add A Comment

Name:


URL:


Email Address: (not public, used to send notifications on further comments)


Comments:



Enter the text above, except for the 1st and last character:


NerdyHearn - Latest tech news relating to C#, ASP.NET, SharePoint, PHP, general development, and more. DocuTerminal - Online Filing Cabinet solution. Scan, search and archive your paper documents. SaveMySerials - Protect yourself from theft, fire, natural disasters and more by recording your serial numbers My Music To Me - Stream your subsonic music collection to your Sonos wireless system TypeCount - Count how often you type across different computers! ServrTrackr - Monitor your SSL certificates, website uptime, and DNS configurations