2010-05-31 10 views

Répondre

0

Je pense que vous avez besoin pour obtenir le LNNOTE de la NOTEHANDLE première, ce qui a l'attribut dont vous avez besoin:

LNNote::GetUniversalID 
1

Avec l'API C il y a 2 options:

NOTEID   NoteID; 
NOTEHANDLE  hNote; 
ORIGINATORID NoteOID; 
ORIGINATORID NoteOID2; 
DBHANDLE  db_handle; 
TIMEDATE  tdModifiedOrig; 
WORD   wNoteClass; 

... ...

// Open the Note and fetch the OID 
if (error = NSFNoteOpen (db_handle, 
     NoteID, 
     0,   /* open flags */ 
     &hNote)) /* note handle (return) */ 
{ 
    printf("Error: unable to open note %lx.\n", NoteID); 
    return (ERR(error)); 
} 

    NSFNoteGetInfo(hNote, _NOTE_OID, &NoteOID); 
    printf("UNID %8X%8X", NoteOID.File.Innards[1], NoteOID.File.Innards[0]); 
    printf("%8X%8X\n", NoteOID.Note.Innards[1], NoteOID.Note.Innards[0]); 

// fetching the OID without opening the note 
if (error = NSFDbGetNoteInfo(db_handle, 
     NoteID, 
     &NoteOID2, 
     &tdModifiedOrig, 
     &wNoteClass)) 
{ 
    printf("Error: unable to scan note %lx.\n", NoteID); 
     return (ERR(error)); 
} 

    printf("UNID %8X%8X", NoteOID2.File.Innards[1], NoteOID2.File.Innards[0]); 
    printf("%8X%8X", NoteOID2.Note.Innards[1], NoteOID2.Note.Innards[0]);