Results 1 to 3 of 3

Thread: DLLs

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    DLLs

    Hey,

    In C++, I can create a dll where if used in vb, the functions have to be declared. (The Windows dll)

    Can I do that in C#??

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    Could use something like the following:
    PHP Code:
    using System;
    using System.Runtime.InteropServices;

    [
    DllImport("my_dll.dll")]
    //assuming LONG is the return type of your function in the DLL
    public static extern long MyFunction(string myStringlong MyLong);

    //...
    static void main(string args[])
    {
        
    long bla;
        
    bla MyFunction("bla"bla);

    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Not what he asked.

    The answer is no.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

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