Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: OSLockBlock
Martin Krauss 17.Dec.01 06:44 AM a Web browser
Lotus Tools -- C API All Releases All Platforms


Hello,
once again I am in deep trouble. Below is my code. Everything works fine until I want to read in the contents of the $AssistInfo Field. I have no idea how to do. Pls have a look at the three different ways I have tried it. At each I get a QNC Error.

CU Martin


Type BLOCKID
PoolHandle As Long
BlockHandle As Integer
End Type

Type TIMEDATE
Innards(1) As Long
End Type

Type ODS_ASSISTSTRUCT
wVersion As Integer
wTriggerType As Integer
wSearchType As Integer
wIntervalType As Integer
wInterval As Integer
dwTime1 As Long
dwTime2 As Long
StartTime As TIMEDATE
EndTime As TIMEDATE
dwFlags As Long
dwSpare(16) As Long
End Type

Declare Function ODSLength Lib APIModule Alias "ODSLength" _
(Byval inte As Integer) As Integer

Declare Function OSLockObject Lib APIModule Alias "OSLockObject" (Byval hObject As Long) As Integer

Declare Function ODSReadMemory Lib APIModule Alias "ODSReadMemory" _
(ppSrc As Long, Byval type1 As Integer, pDest As ODS_ASSISTSTRUCT, Byval iterations As Integer) As Integer

Declare Function OSUnlockObject Lib APIModule Alias "OSLockObject" (Byval hObject As Long) As Integer


Declare Private Function NSFItemInfo Lib "nnotes" Alias "NSFItemInfo"_
(Byval nthandle As Long, Byval item_name As String, Byval name_len As Integer, item_blockid As BLOCKID, value_datatype As Integer _
, value_blockid As BLOCKID, Value_len As Long) As Integer

Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
pDest As ODS_ASSISTSTRUCT, _
Byval pSource As Long, _
Byval dwLength As Long _
)

Declare Function Peek Lib "MSVCRT" Alias "memcpy" _
( N As Any, Byval P As Long, Byval B As Long) As Long

Public Function GetAgentInfo(Byval dbname As String, Byval AgentHandle As Long)
Dim Status As String
Status = "NOERROR"
Dim hAgentNode As Long
Dim bid1 As BLOCKID
Dim bidinfo As BLOCKID
Dim wDataType As Integer
Dim pObject As Long
Dim dwItemSize As Long
Dim Info As ODS_ASSISTSTRUCT
Dim wlength As Integer
Dim ASSIST_INFO_ITEM As String
Dim wann As TimeDate

ASSIST_INFO_ITEM = "$AssistInfo"
Status = NSFItemInfo(AgentHandle, ASSIST_INFO_ITEM, Len(ASSIST_INFO_ITEM), _
Bid1, wDataType, bidinfo, dwitemsize)

pObject = OSLockObject(bidinfo.PoolHandle) + bidinfo.BlockHandle
pObject = pObject + ODSLength(0)

First Try !!!!!:

Status = ODSReadMemory(pObject,Len(Info) ,Info, 1)

Second Try !!!!!:
Peek Info, pObject, Len(Info)
Third Try !!!!!:

CopyMemory Info, pObject, Len(Info)



OSLockBlock (Martin Krauss 12.Dec.01)
. . RE: OSLockBlock (Rod Whiteley 13.Dec.01)
. . . . RE: OSLockBlock (Martin Krauss 14.Dec.01)
. . . . . . RE: OSLockBlock (Rod Whiteley 14.Dec.01)
. . . . . . . . RE: OSLockBlock (Martin Krauss 14.Dec.01)
. . . . . . . . . . RE: OSLockBlock (Martin Krauss 17.Dec.01)
. . . . . . . . . . . . RE: OSLockBlock (Rod Whiteley 17.Dec.01)
. . . . . . . . . . . . . . RE: OSLockBlock (Martin Krauss 18.Dec.01)
. . . . . . . . . . . . . . . . you should declare OSLockObject (..... (Normunds Kalnbe... 18.Dec.01)
. . . . . . . . . . . . . . . . . . RE: you should declare OSLockObject... (Martin Krauss 18.Dec.01)
. . . . . . . . . . . . . . . . RE: OSLockBlock (Rod Whiteley 18.Dec.01)
. . . . . . . . . . . . . . . . . . RE: OSLockBlock (Martin Krauss 19.Dec.01)
. . . . . . . . . . . . . . . . . . RE: OSLockBlock (Cindy Payment 18.Jun.03)
. . . . . . . . . . . . . . . . . . . . RE: OSLockBlock (Rod Whiteley 19.Jun.03)
. . . . . . . . . . . . . . . . . . . . . . RE: OSLockBlock (Cindy Payment 19.Jun.03)
. . . . . . . . . . . . . . . . . . . . . . . . RE: OSLockBlock (Rod Whiteley 19.Jun.03)
. . . . . . . . . . . . . . . . . . . . . . . . . . RE: OSLockBlock (Cindy Payment 26.Jun.03)
. . . . . . . . . . . . . . . . . . RE: OSLockBlock (C Braun 26.Apr.11)






  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow