Thread: Skeleton of a windows32-DLL in C-language

  1. #1
    Unregistered
    Guest

    Question Skeleton of a windows32-DLL in C-language

    I need a skeleton for a DLL, written in C for compiling with the lcc32 compiler not in C++.
    Possible is also the source code of a DLL as an example.
    I have a skeleton in 16 Bit but it does not work.

    Thanks in advance
    Bernhard Peter

  2. #2
    Sayeh
    Guest

    DLL frame

    All you need is the prototype and the calling conventions, then compile it as a code resource. I will see if I can find some DLL source for 32-bit C. Usually all code resource (whether they are DLLs or any other form of code fragment) have the following form:


    Prototype:

    rtrn_val exampleDLLentry(arg_1, arg_2, ...);

    for example, it might look like this:

    long MDEF(int,int,int,char*);

    then when it gets called, it's on this order:

    long MDEF(int msg,int where_click,int last_click,char *stringP)
    {
    switch(msg)
    {
    case POSTFLIGHT:
    break;
    case UPDATE:
    break;
    case DRAW:
    break;
    case CLICK:
    break;
    case POSTFLIGHT:
    break;
    };
    }

    enjoy

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Welcome back Sayeh.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Troubles Calling a DLL
    By jamez05 in forum C++ Programming
    Replies: 2
    Last Post: 12-02-2005, 12:00 PM
  2. Strange loop
    By D@rk_force in forum C++ Programming
    Replies: 22
    Last Post: 12-18-2004, 02:40 PM
  3. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM
  4. Dll question again. Reference to No-One
    By G'n'R in forum C Programming
    Replies: 0
    Last Post: 10-24-2001, 03:52 AM
  5. Exporting Object Hierarchies from a DLL
    By andy668 in forum C++ Programming
    Replies: 0
    Last Post: 10-20-2001, 01:26 PM