LotusScript to C API Programming Guide

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




Hosted by Prominic.NET, Inc.
Main topic: How to pass a pointer got from NSFDbReadObject/OSLockObject?

How to pass a pointer got from NSFDbReadObject/OSLockObject? (by David Zabala, 02/22/2006 05:16:41 AM)


I've been trying this to no avail so it seems I need some help.

NSFDbReadObject hDB, oID&, 0&, MAXDWORD, hBuffer&

hLock& = OSLockObject(hBuffer&)

After this hLock& contains a pointer to object data (in this case a file attachent) if I'm no wrong, do I?

How should I pass this pointer to a c function that expets a char* ?

How shoul I declare this function?

At the moment I have:

hashBuffer hLock&, rS&, shaSum, md5Sum


Declare Function hashBuffer Lib "docHashesDLL.dll" Alias "_hashBuffer@16" ( _

pBuffer As Long, _

Byval bufLength As Long, _

Byval shaSum As String, _

Byval md5Sum As String) _

As Integer


int __declspec(dllexport) WINAPI hashBuffer(

char *pBuffer,

long bufLength,

char *shaSum,

char *md5Sum)


char c = *pBuffer;


gives an exception.

Sure its a dumb question, but after never ending fiddling I'm a bout to pull my hair out.

Thanks in advance