00001 00008 #include "dkcUniqueID.h" 00009 #include "dkcStdio.h" 00010 00011 00012 00013 //シングルリスト領域を得る。 00014 DKC_UNIQUE_ID * WINAPI dkcAllocUniqueID(void){ 00015 DKC_UNIQUE_ID *p; 00016 p = dkcAllocate(sizeof(DKC_UNIQUE_ID)); 00017 if(NULL==p) return NULL; 00018 00019 p->mStream = dkcAllocMemoryStream(sizeof(int) * 100); 00020 if(NULL==p->mStream) goto Error; 00021 00022 return p; 00023 Error: 00024 dkcFree((void **)&p); 00025 return NULL; 00026 } 00027 00028 int WINAPI dkcFreeUniqueID(DKC_UNIQUE_ID **ptr){ 00029 if(NULL==ptr || *ptr==NULL || NULL==(*ptr)->mStream) 00030 return edk_ArgumentException; 00031 00032 dkcFreeMemoryStream(&((*ptr)->mStream)); 00033 return dkcFree((void **)ptr); 00034 }