CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    G day Mayt Land
    Posts
    971

    [RESOLVED] Using a wrapper in c#

    I have a class library (dll)
    this has a few classes that I can use one but not the other.
    Instruction was that I should be able to use the wrapper as below:
    Code:
    using (IAxaptaWrapper Ax = new AxThreadedWrapper())
    {
                Ax.Logon("Auto", "", "", "Original (installed configuration)");
    // etx

    What I CAN DO


    in my calling program after referencing the namespace I was able to do
    Code:
    Axapta.Axapta a = new Axapta.Axapta();
    a.Logon(null,null,null,null);
    without any issue
    but WHAT I CANT DO
    using ( IAxaptaWrapper Ax = new IAxaptaWrapper ()){
    fails with The type or namespace name 'AxThreadedWrapper' could not be found (are you missing a using directive or an assembly reference?)

    so the questions is how do you use IAxaptaWrapper and IAxaptaWrapper from this dll ?

    Code:
    using System;
    using System.Collections.Generic;
    namespace Axapta
    {
        public interface IAxaptaWrapper:IDisposable
        {
    and
    Code:
    namespace Axapta
    {
        public class AxThreadedWrapper: IAxaptaWrapper
        {
            public AxThreadedWrapper()
            {
    Last edited by Saeed; April 7th, 2014 at 09:52 PM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: Using a wrapper in c#

    Hey Saeed.

    Silly suggestion / question :

    Did you reference this dll - be it through project references or by importing the type library namespace?

  3. #3
    Join Date
    May 1999
    Location
    G day Mayt Land
    Posts
    971

    Re: Using a wrapper in c#

    Hi
    Yes mate I did.
    I resolved the issue. I was calling it in a static main .silly me.
    Hope you are well

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured