Click here to Skip to main content
15,891,905 members
Articles / Programming Languages / C#

How To Build an Assembly that Exposes Win32 APIs and Native COM Objects

Rate me:
Please Sign up or sign in to vote.
3.69/5 (8 votes)
18 Jun 2007CPOL2 min read 35.9K   485   24  
Make managed and unmanaged calls into a DLL library
#ifdef AUTHORIZATION_EXPORTS
#define AUTHORIZATION_API __declspec(dllexport)
#else
#define AUTHORIZATION_API __declspec(dllimport)
#endif

extern "C" AUTHORIZATION_API BOOL _stdcall IsUserAuthorized(wchar_t* szDomain,  wchar_t* szUser, wchar_t* szPassword);

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Decebal Mihailescu is a software engineer with interest in .Net, C# and C++.

Comments and Discussions