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

Calling a .NET Dll in C++ / COM

350 views
Skip to first unread message

Meena

unread,
Jul 15, 2004, 12:06:03 PM7/15/04
to
Hi ,

We use a sotware development language called Dexterity, which is propritery of Great Plains, now part of Microsoft. I have a .NET Assembly, Cryption.dll, which has two functions "encrypt" and "Decrypt". This Dll encrypts and decrypts a string using TripleDESAlgorithm. I know the DLL is working okay because I created a simple .NET windows application to accept an input string and call the Encrypt and Decrypt functions of my DLL and it works fine. We want to be able to call this DLL from Dexterity and use its functions.

However recenly we came to know that Dexterity does not have the ability to call a .NET DLL. We were advised by the support team from Microsoft Business Solutions , and below is their response:

"Your best bet is to write a COM interface to your .NET dll and then access these functions via COM in dexterity. Or your other option is to write this in C/C++ as a stdcall exported dll."

I am intersted in writting a wrapper in C++ which just calls my functions in the .NET dll. I see the flow as Dexterity->calls C++ wrapper(which is itself a dll) -> calls .NET assembly.

If so, here is my question.

2. I have Visual Studio .NET with me here. In that I see that I can create a project under the category C++ projects. This category has the following types of projects( names listed below are how they appear in the IDE)
1. Class Library(.NET)
2. Win32 project (.NET)
3. Win32 Console Application.

I am confused if I can use one of these projects or do I need to use the old classic Visual Studio with C++ and create my file there which accesses the .NET dll. Please send me sample code examples if you can, so that I can get an idea where to start.

In general the question boils down to "How to call a .NET dll in C++ and thereby create a C++ DLL or COM Interface". I want to know the difference between writting a COM interface and a C++ DLL.

Thanks,

Meena

wissam

unread,
Aug 31, 2004, 10:35:02 AM8/31/04
to
Guys

This subject caught my attention since am facing a problem somehow related.

I am working with Dexterity, and am using a normal DLL Converter.dll
This library has 2 methods:
one is takes in a string, and returns a string.
one takes in a datetime and returns a datetime.

The "datatype" of the function defined as string, is shown as "ANONYMOUS" in
class browser in dexterity. And therefore am not able to call it since it
generats a datatype error on runtime.
The datetime on the other hand works fine.

Whos problem is it?
Dexterity, or VS which developed the converter.dll ??
And how to overcome it?

Thanks Guys

Natalie Van

unread,
Sep 16, 2004, 7:03:05 AM9/16/04
to
Hi Meena

I develop in dexterity as well.
I am faced with the exact same task.
I have to encrypt a file from with dexterity and then decrypt it from
Visual Basic later on.

Have you found a solution for this wrapper function?
Can this .net Dll be called from VB6?
If it can be called from VB6 we could perhaps do an exchange - your
.net Dll for our Wrapper?

Regards

Ioannis Vranos

unread,
Sep 16, 2004, 8:46:46 AM9/16/04
to
Natalie Van wrote:

> net Dll for our Wrapper?

However I think that you would probably find more help in VB newsgroups
than VC++ ones.

--
Ioannis Vranos

nilotpal

unread,
Dec 3, 2009, 7:42:38 AM12/3/09
to
i have created a VB dll in VB2005 and trying to call it from dexterity but not able to do that.
anyone can help me..

From http://www.google.co.in/search?hl=en&q=how+to++use+dll+from+dexterity&meta=&aq=f&oq=

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/

Andrew Jarvis

unread,
Dec 7, 2009, 8:39:37 AM12/7/09
to
VB2005 produces managed code DLLs.

The following is from one of the links in the Google search you provided:

http://www.eggheadcafe.com/software/aspnet/33191105/how-to-use-net-dll-in-gp.aspx

If you want to use the .Net Dll in the Dexterity, then refer the "Assemblies
created with the .NET Framework" topic in the Dexterity Programmer's Guide
Volume 2 (Page No: 342).


"nilotpal" <nos...@developmentnow.com> wrote in message
news:2980f1e2-3720-4ab5...@developmentnow.com...

0 new messages