Results 1 to 7 of 7

Thread: [RESOLVED] [3.0/LINQ] DLLImport from a C++ DLL

Threaded View

  1. #6
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [3.0/LINQ] DLLImport from a C++ DLL

    Unmanaged non-COM libraries cannot be registered.
    .NET assemblies can't be registered unless they expose a COM interface. If the assembly is not loaded into the GAC, you could use gacutil to manually import it.

    Unmanaged DLLs are searched for in the directories specified in the PATH environment variable. If you have it in another, you must fully qualify the path in the DllImport attribute.

    You should also mark your C++ functions as stdcall. I think the default is cdecl, even for exported functions.
    Last edited by penagate; Mar 8th, 2008 at 07:39 PM.

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