16,548
社区成员




typedef struct tagLAB
{
char name[255];
char pass[255];
}LAB, *PLAB;
//////////////////////////////////////
strcpy(log.name ,"hello");
strcpy(log.pass ,"number");
hFile = CreateFile(L"D:\\保存试验.txt", GENERIC_WRITE, 0, (LPSECURITY_ATTRIBUTES)NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, (HANDLE)NULL);
WriteFile(hFile, &log , (strlen(log.name) + strlen(log.pass)), &dw, NULL);