Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use Managed DLL in Unmanaged DLL and vice versa...

18 views
Skip to first unread message

Arif Ali Saiyed

unread,
Jan 8, 2010, 2:44:41 PM1/8/10
to
Hi All,
I was tring to create some dialogs with basic windows
controls like tabs,checkbox, picture control, buttons, URL links
etc....

I discovered that's it's very time copnsuming doing it pure Win32
way ... then I thought of exploring other technology/apps...

Delphi/ MFC/.NET

I discovered creating forms using .NET is very easy it's almost like
VB...where you just design what you want and code gets generated.....

In VS2008 I created a New Project-> Visual C++-> CLR ->Windows Form
Application .... and it worked fine

Now I wanted to create a ..NET DLL which would hold my all
dialogs ...provide some exported helper functions to invoke them from
pure Win32 Application or DLL

I created New Project-> Visual C++-> CLR ->Windows Form Control
Library.....

which does generate a DLL ...but I am not able to export any
function from this DLL
when I try to export any function

I get following two error

error C3389: __declspec(dllexport) cannot be used with /clr:pure or /
clr:safe
error C3395: 'myfunction' : __declspec(dllexport) cannot be applied to
a function with the __clrcall calling convention


how do i get of rid of this i went to propject properties and tried if
i could remove those flag /clr:pure and /clr:safe
but i could not find any option there....


I also want to used some exported structure ( which contain only
member variable and no functions)
of Win32 DLL...

This was first time ever i used .NET ..
Any URLs to learn how to do what i want to do , would be really
helpful....

Thanking you all in advance
-Arif

0 new messages