Click here to Skip to main content
15,894,330 members
Articles / Programming Languages / C#

Simplify Native DLL Documentation for Use by .NET / Managed Code Authors

Rate me:
Please Sign up or sign in to vote.
4.00/5 (3 votes)
13 Sep 20072 min read 32.4K   553   21  
An article describing how to manage the interface between native and managed code
#ifndef SAMPLE_HEADER
#define SAMPLE_HEADER

#include <windows.h>
#include <tchar.h>


#ifdef  __cplusplus
extern "C" {
#endif

#define DLLEXPORT	__declspec(dllexport) 


/*
@messheader: My Messages | These are messages that can be sent from the native code to a Window created by managed code.
<br/><br/>
The C# enum is <pre>
    public enum ShellMessage
    {
        DoSomething = 0x00,
        DoSomethingElse
    }</pre>
*/

/*
@mess:	DO_SOMETHING | 0x00 | Cool message that indicates X.
@note:	Notes can go here
*/
#define	DO_SOMETHING			0

/*
@mess:	DO_SOMETHING_ELSE| 0x01 | A message that indicates that Y has happened
*/
#define	DO_SOMETHING_ELSE		1


#ifdef  __cplusplus
}
#endif


#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions