K
kingswang
Unregistered / Unconfirmed
GUEST, unregistred user!
#include "stdafx.h"
#include "List.h"
typedef struct _LISTITEM
{
struct _LISTITEM* pUp;
struct _LISTITEM* pNext;
SONGINFO Info;
}LISTITEM;
typedef struct _LIST
{
S8 Path[ MAX_PATH ];
LISTITEM* pListItem;
}LIST;
//创建以pFilePath为名字的新列表文件(空的列表)。
BOOL TListCreate( LIST* pList, S8* pFilePath )
{
//创建文件pFilePath
HANDLE file = CreateFile( pFilePath, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL );
//创建文件失败。
if( file == INVALID_HANDLE_VALUE )return 0;
strcpy( pList->Path, pFilePath );
pList->pListItem = NULL;
CloseHandle( file );
return 1;
}
#include "List.h"
typedef struct _LISTITEM
{
struct _LISTITEM* pUp;
struct _LISTITEM* pNext;
SONGINFO Info;
}LISTITEM;
typedef struct _LIST
{
S8 Path[ MAX_PATH ];
LISTITEM* pListItem;
}LIST;
//创建以pFilePath为名字的新列表文件(空的列表)。
BOOL TListCreate( LIST* pList, S8* pFilePath )
{
//创建文件pFilePath
HANDLE file = CreateFile( pFilePath, GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL );
//创建文件失败。
if( file == INVALID_HANDLE_VALUE )return 0;
strcpy( pList->Path, pFilePath );
pList->pListItem = NULL;
CloseHandle( file );
return 1;
}