How Do I Call a DLL Created in Microsoft.NET from ATEasy 3.x or 4.x?

Knowledge Base Article # Q200044

Read Prior Article Read Next Article
Summary Using .NET assemblies from ATEasy 3.x/4.x.

ATEasy 3.x or 4.x (ATEasy 5.x and above support importing and using .NET assemblies directly) cannot call Microsoft.NET assemblies directly. Even if you create a Microsoft.NET class library with public methods, Microsoft.NET will compile these into Microsoft.NET assembly. This assembly will still have a .DLL extension, but it is NOT a dynamic link library (DLL). For more information on assemblies, see assemblies.

One way to use the .NET assembly from ATEasy is by wrapping the .NET classes in your .NET library to ActiveX COM objects using a tool that is provided with .NET.  This tool works as follows:

1.   Register the .NET assembly using the .NET Framework Assembly Registration Utility (RAGASM.EXE) for example:

RGEASM MyLib.dll /tlb

The /tlb option is optional and will create and register a type library with the name MyLib.tlb. The type library can then inserted to the ATEasy sub module Libraries and can be used as other early binding objects.

2.   Install the assembly into the Global Assembly Cache  (GAC) using the .NET Framework Global Assembly Cache Utility (GACUTIL.EXE) for example:

GACUTIL –I MyLib.dll

3.   After these step the .NET components can be used similar to any other COM object from ATEasy. Both methods early and late binding can be used.

Another workaround is to create an actual dynamic link library (DLL) from a Microsoft.NET language. This can be done with Visual Studio.NET. From within Visual Studio.NET, select File » New » Project. You can then select Visual C++ as the Project Type and Win 32 Project as the Template. After you click OK, you can then select Application Settings, rather than Overview. Then select DLL as the Application Type and select Export Symbols as Additional Options
Article Date 2/3/2003 4:27:33 PM
Keywords ATEasy, .NET

0 ratings | 0 out of 5
Read Prior Article Read Next Article