Thread: Can someone please explain this?

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    30

    Can someone please explain this?

    Hi, I've been learning how to create DLL's for mIRC recently, and I saw this in the help file:

    Code:
    int __stdcall (*UnloadDll)(int mTimeout);
    I'm new to creating DLL's, I can create them and everything, but I dont know too much to do with them, so what do the brackets around UnloadDll mean? This has gotten me totally and utterly confused. I cant seem to pull my head around this one. Any explanations would be greatly appreciated.

    Dan

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    http://www.function-pointer.org/
    UnloadDll is a pointer to a function. That function takes an int parameter (which will get used as a timeout if the parameter name is accurate), and it will return an int.

    The __stdcall is a compiler specific extension to help it figure out the right thing to do when calling across language boundaries (its called a calling convention).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can you explain these bitwise operations?
    By 6tr6tr in forum C++ Programming
    Replies: 6
    Last Post: 10-29-2008, 01:19 PM
  2. Please explain?
    By neo_phyte in forum C Programming
    Replies: 3
    Last Post: 08-25-2006, 05:23 AM
  3. Can someone explain to me what this code means
    By Shadow12345 in forum C++ Programming
    Replies: 3
    Last Post: 12-22-2002, 12:36 PM
  4. Replies: 4
    Last Post: 11-19-2002, 09:18 PM
  5. Can someone explain "extern" to me?
    By valar_king in forum C++ Programming
    Replies: 3
    Last Post: 09-16-2001, 12:22 AM