Welcome! Log In Create A New Profile

Advanced

Calling A .NET Class In A WinDev Form

Posted by kevinw 
kevinw
Calling A .NET Class In A WinDev Form
July 08, 2008 12:01PM
A am trying to call a class in a .NET assembly from a WD12 window. The .NET class is called Country inside an assembly called WinDev_DotNET.dll

I have placed this assembly (which I know works fine from a .NET form) in the WD project directory, together with the file WD120NET2.DLL as specified in the Help.

I have then tried to call it a couple of ways - using the Dynamic keyword as I found in a search in this forum - without success:

GLOBAL
loCountry is object WinDev_DotNET.dll dynamic = new Country();

or

GLOBAL
loCountry is object Country dynamic = new Country();

Any other suggestions as to the syntax to use?

TIA, Kevin
kevinw
Re: Calling A .NET Class In A WinDev Form
July 08, 2008 01:23PM
For anybody else reading this, adding the Assembly to the .NET References in the Project helps!

Kevin
Bob Stratton (bosher)
Re: Calling A .NET Class In A WinDev Form
July 08, 2008 01:25PM
Hi Kevin,

I presume it now works??

If not, reply and I'll see if I can help

Cheers

Bob
kevinw
Re: Calling A .NET Class In A WinDev Form
July 08, 2008 02:05PM
Hi Bob,

Well the form now starts, but then crashes. However, I believe this is more to do with the .NET assembly (or calling it from a non-.NET client) than WinDev.

Anyway, my problem now.

Regards, Kevin
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: