Results 1 to 5 of 5

Thread: Location in Public Declare ~Lib ~

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2002
    Posts
    142

    Location in Public Declare ~Lib ~

    I have some Publicly declared subs :

    VB Code:
    1. Private Declare Sub Calc_VPR Lib "C:\Program Files\Microsoft Visual Studio\VB98\TestDll\new.dll" (ByRef Avg As Short, ByVal dpdtAvg As Short, ByVal pulseAvg As Short, ByVal maxPct As Single, ByVal Length As Short, ByRef ArrInput As Single, ByRef ParOutput As Single, ByRef ArrOutput As Single, ByRef ArrPulse As Single, ByRef ArrDiff As Single)


    I would like to make the library dynamic based upon where they load the program :

    Dim dllplace As String = Application.StartupPath & "\new.dll"


    and then stick it onto the sub but I tried, but need help.

    Any thoughts???


    Cheers,
    Bebandit

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    If you omit the path completely, it will look in the directory that you are running in, then system folder (or the other way around, I forget ) for the DLL.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2002
    Posts
    142

    Almost.....

    If I try this:
    Declare Sub Calc_DBP Lib "" (ByVal Avg As Short,......

    OR

    Declare Sub Calc_DBP (ByVal Avg As Short,.......

    OR

    Declare Sub Calc_DBP Lib (ByVal Avg As Short,........


    It doesn't work...... Any Ideas?????

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    No, no. You still put the file name in with Lib, just not the path to the file.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Originally posted by crptcblade
    If you omit the path completely, it will look in the directory that you are running in, then system folder (or the other way around, I forget ) for the DLL.
    If you think a little about it, it will first look in the folder dir, and only then in the system one lol
    \m/\m/

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