LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: Size of HANDLE on OS/2

Size of HANDLE on OS/2 (by Jochen Sack, 07/12/2005 09:34:49 AM)

I know this is a bit far-fetched, since [almost] nobody is using OS/2 any more... Anyway, I wrote a little LotusScript agent to determine the size of HANDLEs on different platforms. To my surprise, it turned out that they seem to be only 2 Bytes in OS/2 -- not 4 Bytes as mentioned in the ls2capi book. I conclude this from the fact that the higher 2 Bytes of the hDb variable (see below) were not modified by the call to OS2_NSFDbOpen.

Am I missing something?

=====LotusScript Code used for testing=====

Declare Function OS2_NSFDbOpen Lib "inotes" Alias "NSFDbOpen" (Byval sDbPath As String, rhDb As Long) As Integer

Dim hDb As Long

hDb = &hEEEEEEEE

If 0 = OS2_NSFDbOpen( "MyDatabase.nsf", hDb ) Then

   Msgbox "hDb=&h" & Right( "00000000" + Hex$( hDb ), 8 )

   Call NSFDbClose( hDb )

End If

=====Output produced=====

hDb=&hEEEE0085