Writing Plugins in C

This is a discussion on Writing Plugins in C within the C Programming forums, part of the General Programming Boards category; Morning, can anyone help me with the following problem. I'm trying to write an application (in C) which will provide ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    4

    Question Writing Plugins in C

    Morning, can anyone help me with the following problem.

    I'm trying to write an application (in C) which will provide support for a selection of internally developed plugins (each plugin will support exactly the same no. of methods so the application doesn't need any prior knownledge that a plugin exists). However after a quick search around the internet I found absolutly nothing on the topic of how to do this, generally sites only cover how to develop plugins for already available applications.

    Can anyone point me in the right direction (source code is preffarble if possible) on how to create an application which can load its own specifically designed plug-ins and execute them. I'm currently following a similar design to the visual plugins (plugins are written as dll files) that Winamp uses however obviously without the source code to winamp I dont know how I can load in the plugins and execute the contained methods.

    Thanks in advance Kiel.

  2. #2
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161
    I'm not exactly sure what you want to do, but dynamically-loaded dlls might do the trick?
    I'm doin some audio plugs right now that uses this method..
    /btq
    ...viewlexx - julie lexx

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    What I'm trying to do is create an application which supports its own standard of plugins, however I dont know how this can be done. I'm sorta following a similar method to winamp's visual plugins but without knowing how winamp loads the plugins I'm a bit stuck.

    Do you have any ideas how I can do this?

  4. #4
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161
    I dont know anything about winamp plugins except that they're
    dlls loaded dynamically when you start the program..that's maybe
    the best way to make you host aswell...?

    /btq
    ...viewlexx - julie lexx

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    A better question to ask would be how do I dynamically load a dll file then?

  6. #6
    btq
    btq is offline
    julie lexx... btq's Avatar
    Join Date
    Jun 2002
    Posts
    161
    he..now we're getting somewhere
    the best way might be to check some tutorials:
    this one was posted on this board some days ago..
    It's compact but kinda good I guess..
    You would want the last section where they use LoadLibrary()
    (assuming you're on windows)

    /btq
    ...viewlexx - julie lexx

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    4
    Thanks for the help!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 05-20-2008, 09:57 AM
  2. Very slow file writing of 'fwrite' function in C
    By scho in forum C Programming
    Replies: 6
    Last Post: 08-03-2006, 03:16 PM
  3. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 09:44 AM
  4. help! fifo read problem
    By judoman in forum C Programming
    Replies: 1
    Last Post: 08-16-2004, 10:19 AM
  5. file writing and reading
    By Micko in forum C Programming
    Replies: 8
    Last Post: 01-13-2004, 11:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21