static void SaveToMemopad(void)
{
DmOpenRef memoDB;
MemHandle MemoRecordHandle;
void *MemoRecordPtr;
UInt16 MemoIndex=0;
char MemoString[256]; //保存する文字列を入れるところ
memoDB=DmOpenDatabaseByTypeCreator('DATA','memo',dmModeReadWrite);
MemoRecordHandle=DmNewRecord(memoDB,&MemoIndex,StrLen(MemoString)+1);
MemoRecordPtr=MemHandleLock(MemoRecordHandle);
DmSet(MemoRecordPtr,0,StrLen(MemoString)+1,0);
DmWrite(MemoRecordPtr,0,MemoString,StrLen(MemoString));
MemHandleUnlock(MemoRecordHandle);
DmReleaseRecord(memoDB,MemoIndex,true);
DmCloseDatabase(memoDB);
}
[0回]
PR