Page 1 of 1

How can I use VPrt in WinHelp Callbacks?

Posted: Sun Aug 29, 2004 11:56 am
by Stefan Schnell
Hello community,
I want to use the callback function from WinHelp. To initialize the callbacks it is necessary to use VPrt (Virtual Pointer).
Does anybody knows what VPrt are and how can I use it?
The code looks like this:

Code: Select all

ProcedureDLL.l LDLLHandler(wMsg.w, lParam1.l, lParam2.l)
  Select wMsg
    Case 1 ;DW_WHATMSG
      ProcedureReturn 4 | 16 | 2 ;DC_JUMP | DC_CALLBACKS | DC_INITTERM
    Case 4 ;DW_INIT
      ProcedureReturn 1
    Case 7 ;DW_ENDJUMP
      MessageRequester("LGetInfo", Str(LGetInfo), #PB_MessageRequester_Ok)
      ;Order CallFunctionFast and the adress of the procedure LGetInfo
      ;TopicNo.l = CallFunctionFast(LGetInfo, 0, 7) ;<-Program crash here
      MessageRequester("Jump ", "End" + CrLf + Str(lParam1) + CrLf + Str(lParam2) + CrLf + Str(TopicNo), #PB_MessageRequester_Ok)
      ProcedureReturn 1
    Case 10 ;DW_CALLBACKS
      ;Here I get the pointer to VPtr with lParam1
      ;and I need LGetInfo, the 15th element of the VPtr array (?)
      LGetInfo.l = lParam1 + (15 * 4)
      ProcedureReturn 1
  EndSelect
EndProcedure
If anybody has a special tip to the specific problem or a code snippet, please let me know.
Thanks.
Bye
Stefan