Results 1 to 7 of 7

Thread: Private Declare Function DllRegisterServer Lib " " () As Long ?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I'm trying to do this:

    Code:
    Private Declare Function DllRegisterServer Lib app.path & "dimava.ocx" () As Long
    Private Declare Function DllUnregisterServer Lib "MyDll.Dll" () As Long
    Const ERROR_SUCCESS = &H0
    so it comes up to a synax error, why?

    (P.S. this is the declerations part of the Registaring an OCX/DLL code)
    NXSupport - Your one-stop source for computer help

  2. #2
    Guest
    Put dimava.ocx in the C:\Windows\System directory and use this:

    Code:
    Private Declare Function DllRegisterServer Lib "dimava.ocx" () As Long
    Private Declare Function DllUnregisterServer Lib "dimava.ocx" () As Long
    Const ERROR_SUCCESS = &H0

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    that will work, but for many reasons I want ymy ocx's kept in the same folder with my programs, so I was thinking mabye something like:

    Code:
    Dim strOCX as string
    Private Declare Function DllRegisterServer Lib strOCX () As Long
    Private Declare Function DllUnregisterServer Lib strOCX () As Long
    Const ERROR_SUCCESS = &H0
    but that doesn't work either
    NXSupport - Your one-stop source for computer help

  4. #4
    Guest
    Instead of using App.Path, simply specify the path manually.
    Code:
    Private Declare Function DllRegisterServer Lib "C:\MyPath\dimava.ocx" () As Long

  5. #5
    Guest
    If you don't want to do that, than I suggest you move it to the Windows\System directory. It is best to be located there. So no matter where you exe file has been moved, it will always work. Whereas, if your exe file was moved to a different folder, but the ocx stayed in the same place, it would probably create an error.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    I want it to be in the same folder as the program, and megatron, the user selects the folder where they want all of the files to be installed to
    NXSupport - Your one-stop source for computer help

  7. #7
    Guest
    dimava:
    RegSvr32.exe is only about 30kb..
    it won't make your apps that much bigger...

    not that you could actually make something good enough to distribute.... but thats just IMO.....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width