Click to See Complete Forum and Search --> : Calling DLLs in VB


medleyj
September 7th, 2001, 01:35 PM
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.

makai
September 8th, 2001, 01:25 AM
HelpFile() is some ByRef array not a ByVal String