Closed Thread
Results 1 to 4 of 4

Thread: C# DLL's

  1. #1
    xarzu's Avatar
    xarzu is offline Newbie
    Join Date
    Jun 2007
    Posts
    14
    Rep Power
    0

    C# DLL's

    I thought that my problem was how I was declaring a manifest file.
    But now I think I can safely rule this out.

    I think the probem lies in the way I am loading the DLL/COM object
    that the manifest file references.

    The program runs -- sort of. After I embed the manifest file into
    the executable. I just cannot step through the code in debug mode.

    So I put the manifest file into the list of files that the IDE had
    to reference. And then I noticed a big change. Then the executable
    that I produced had an error message (that I could ignore and continue
    running the program, if I choose to) that said the probem was
    with the way I was loading the COM object.

    How do I load a DLL into a GUI front-end written in C#. Where
    should I look for possible problems?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    NeedHelp Guest
    Add it as a reference. It should appear in your list once you do.

  4. #3
    xarzu's Avatar
    xarzu is offline Newbie
    Join Date
    Jun 2007
    Posts
    14
    Rep Power
    0
    Quote Originally Posted by NeedHelp View Post
    Add it as a reference. It should appear in your list once you do.
    I have added it as a reference. It still has a problem running a method declared in the DLL.

    Maybe there is a problem with the way I am using the DLL. How do I simply add a DLL to a project and expose its methods? All I am doing is this so far. I have added the DLL to the Solutions Explorer as a Reference. Then, in the C Sharp file where I make the function call, I list the DLL at the top of the file as one of the "using" types. That seems to be all that is done in the code. What more do I need?

  5. #4
    BackSlash is offline Newbie
    Join Date
    Feb 2008
    Posts
    12
    Rep Power
    0
    Is the DLL for unmanaged code, you will have to set up the links for the function calls manually

    [DllImport("wpcap.dll", CharSet=CharSet.Ansi)]
    internal extern static int pcap_compile (IntPtr /* pcap_t* */ adaptHandle, IntPtr /*bpf_program **/fp, string /*char * */str, int optimize, UInt32 netmask);


    Example from a Pcaps Project

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Java calling Windows COM DLL's
    By gregwarner in forum Java Help
    Replies: 4
    Last Post: 06-03-2011, 10:18 AM
  2. .dll's required by codes
    By powellja007 in forum General Programming
    Replies: 0
    Last Post: 02-25-2010, 03:41 PM
  3. Can these old dll's be properly edited in C++ 4.5?
    By SouthPacific in forum C and C++
    Replies: 0
    Last Post: 06-21-2009, 01:28 PM
  4. A Question On Dll's
    By rwkeith in forum C and C++
    Replies: 1
    Last Post: 02-05-2009, 07:43 PM

Tags for this Thread

Bookmarks

Posting Permissions

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