Thread: Registering DLL

  1. #1
    Registered User
    Join Date
    Oct 2001

    Question Registering DLL

    When trying to register a dll, error "no registry helper is available" occurs. How can I register/use a c/c++ DLL

  2. #2
    Registered User
    Join Date
    Sep 2001
    A dll that registers itself has a "STDAPI DllRegisterServer(void)" entry point.

    That registration is typically used for COM objects. The registration allows an object to instantiated using a CLSID with the CoCreateInstance API. It searches the registry to find the CLSID associated with that dll and its location.

    If you just need to get a function out of a dll you can use. LoadLibrary( LPCTSTR lpLibFileName ) and GetProcAddress( HMODULE hMod, LPCSTR lpProcName ) where

    Pointer to a null-terminated string that names the executable module (either a .DLL or .EXE file).

    Handle to the DLL module that contains the function. The LoadLibrary or GetModuleHandle function returns this handle.

    Pointer to a null-terminated string containing the function name, or specifies the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.

    I'm not sure if I answer the question or just made a lot of noise.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  2. Replies: 1
    Last Post: 09-18-2005, 09:06 PM
  3. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  4. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM