Hi, I am working with Notes API and I am facing a problem and it is that I have no idea about the value that has to be passed as an arguement in the second parameter of this function call having Syntax
ODSWriteMemory(
void far *ppDest,
WORD type,
const void far *pSrc,
WORD iterations);
What is the value that has to be passed for the parameter “type” for specific design elements specifically for views.
Thanks in Advance!
Subject: A query about ODSWriteMemory
The second parameter contains a “type” of data structure to be written. However “view” can be not regarded as a single structure, it’s a notes document; you may need to write specific fields to create/modify the view as you need.
I’d suggest that you go to:
http://www-10.lotus.com/ldd/toolkits
and get the C API toolkit that includes C API documentation. It’s pretty hard to “work with Notes API” without access to proper documentation.
good luck
Normunds
http://www.ls2capi.com
Subject: Re:A query about ODSWriteMemory
Hi, Thanks for your advice. But the problem that I am facing is that I am trying to write back to disk the View and Column Format data structures and it is written that they should be first converted to Canonical Form using ODSWriteMemory before writing them back to disk and for this purpose they have defined that suppose I have to write the VIEW_TABLE_FORMAT data structure then the paramaeter that is to be passed for “type” is
_VIEW_TABLE_FORMAT to the ODSWriteMemory. But no where can I find that to what does this value map to.
Do you have any idea about it.
Thanks in Advance!
Subject: RE: Re:A query about ODSWriteMemory
I guess I do not understand your problem. Are interested for some reason to find values(?); or how these constants are defined(?). In this case you could check “_xxx (ODS Types)” entry in C API reference or header file “odstypes.h”.
Though as far as you can find in C API documentation which type to use for each structure you have no need to bother about them.
If you write the code only for XP (or Windows in general) AFAIK you may as well skip all this conversion business and simply copy the structures; still, if you eventually will like this code to be portable you may need to go through and change everything so that it uses ODSWriteMemory. And I guess it’s better to have it right from the beginning.
Subject: RE: Re:A query about ODSWriteMemory
Hi Again, Thanks for you guidance. I was eventually able to find how to use this function. But the problem that I was facing prior to using this function it is still there. Can you help me in that.
Well I have an application through which I am changing View Styles of Views. Everything works fine in the views in which I have make changes until and unless I do one thing and that is to change the column value from field to formula or vice versa. If I do this then the column just goes blank and it does not show any value.
I thought may be some problem in writing the structure back to the disk and for that very purpose was I interested in using ODSWriteMemory. But it seems that the problem is somewhere else as I am still facing the same problem even after incorporating this function.
Do you have any idea about the possible solution for this problem.
Thanks in Advance!
Subject: RE: Re:A query about ODSWriteMemory
if you change from item to formula, your need to recreate $FORMULA field. You probably make some mistake in that process? Just a guess, I haven’t done this particular thing, but I would not expect it to be a trivial exercise.