Thread: Register DLL w/o regsvr32.exe

  1. #1
    Registered User
    Join Date
    Mar 2004

    Register DLL w/o regsvr32.exe

    Would this work?
    int regDll(char *dllPath) 
    	if (strlen(dllPath) == 0) return 1;
    	/* get handle to dll */
         HINSTANCE hGetProcIDDLL = LoadLibrary(dllPath);
         /* get pointer to the function in the dll */
         FARPROC lpfnGetProcessID = GetProcAddress(HMODULE(hGetProcIDDLL), "DummyFunction");
    	 /* release DLL */
         return 0;
    void DummyFunction (void) {};
    Edit: I just realized that I don't have the register routines in here yet.
    Last edited by il96; 03-15-2004 at 01:26 PM.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    I dont have any compilers installed right now so I cant give a working example.....but I can give you this link which does the business;en-us;q140346

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. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 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