CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Location
    Kansas City, Missouri
    Posts
    45

    Calling DLLs in VB

    I have a VB routine that is making the following call to WinHelp

    Here is the Function declaration.


    Declare Function WinHelp Lib "user32.dll" Alias "WinHelpA" _
    (byval hwnd as Long, _
    byval lpHelpFile as string, _
    byval wCommand as Long, _
    byref dwData as Long) as Long




    And here is the call.


    Dim lngReturn as Long

    lngReturn = WinHelp(frmObjectWindow.hwnd, HelpFile(), HELP_CONTEXTPOPUP, lngContextID)




    Every time I run this I get the message "No help topic is associated with this item."

    I know three things about what is going on.

    1. When I step through the code I find that lngContextID contains a valid context ID.

    2. When I use WinHelp BugHunter (32bit) to monitor the help file, it shows that an incorrect context ID is being passed to the help file. BugHunter is a help debuging app that ships with RoboHelp a common help authoring package.

    3. I can also use BugHunter to pass the context ID to my help file manuall. When I do this, the help file displays the correct topic.

    I have gone over every inch of this problem a god dozen times. Nothing jumps out at me. On the face of it, tt appears that VB is chaning the value of the data in my call.

    Has anyone ever seen anything like this? Does anyone know how to fix it?

    Any help would be greatly appreciated.


  2. #2
    Join Date
    Jul 2000
    Location
    Hawaii
    Posts
    281

    Re: Calling DLLs in VB

    HelpFile() is some ByRef array not a ByVal String


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

Featured