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: Compiling an @Formula in Visual Basic

Compiling an @Formula in Visual Basic (by Kenneth Haggman, 03/07/2007 04:23:38 AM)

Mate, I have really tried but I can't get this to work.

Honestly, I am not the sort of person who goes screaming for help as soon as something gets a bit tricky. But this time I am stuck.

I have reached the following conclusions/assumtions:

1. NSFFormulaCompile will need the input string to be LMBCS.

2. I will need to allocate a buffer and lock some memory.

3. I will also need to unlock and free the memory after use.

But I am getting so confused as to what is what!

I am attempting to compile a view selection formula that has been extracted from a view (using COM and notesView.SelectionFormula) into a plain VB string.

This string is, if I understand it correctly, in 'native' format (neither unicode nor LMBCS) and can't be used directly in the NSFFormulaCompile API.

So a buffer needs to be allocated and locked - how?

The OSTranslate API (or perhaps the NLS_Translate API) needs to be used - but how should the API be declared and how should it be called?

As you can see, I am all lost.

I would greatly appreciate any VB-converted code you can produce, hopefully as complete as possible.