[
板情報
|
カテゴリランキング
]
したらばTOP
■掲示板に戻る■
全部
1-100
最新50
|
メール
|
1-
101-
201-
301-
401-
501-
601-
701-
801-
901-
1001-
1101-
1201-
1301-
1401-
1501-
1601-
1701-
1801-
1901-
2001-
2101-
2201-
2301-
2401-
2501-
2601-
2701-
2801-
2901-
3001-
3101-
3201-
3301-
3401-
3501-
3601-
3701-
3801-
3901-
4001-
4101-
4201-
4301-
4401-
4501-
4601-
4701-
4801-
4901-
5001-
5101-
5201-
5301-
5401-
この機能を使うにはJavaScriptを有効にしてください
|
管理人の独り言(プログラミング関連)
2082
:
◆adhRKFl5jU
:2009/07/20(月) 21:53:20
#define UNICODE
#include <iostream>
#include <string>
#include <windows.h>
using namespace std;
void EnumDirectory(wstring);
int main(int argc, char **argv){
EnumDirectory(L"\\\\?\\U:\\");
}
void EnumDirectory(wstring path){
wstring buff = path + L"*";
WIN32_FIND_DATA d;
HANDLE hFind = FindFirstFile(buff.c_str(), &d);
if(hFind != INVALID_HANDLE_VALUE){
do{
if(d.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY){
if(lstrcmp(d.cFileName, L".") != 0 && lstrcmp(d.cFileName, L"..") != 0){
EnumDirectory(path + d.cFileName + L"\\");
}
}else{
wstring filename = path + d.cFileName;
unsigned int len = filename.length();
if(filename[len - 1] == L'0' && filename[len - 2] == L'0' && filename[len - 3] == L'5' && filename[len - 4] == L'T' && filename[len - 5] == L'.'){
char *p = new char[filename.length() * 2];
WideCharToMultiByte(CP_ACP, 0, filename.substr(4, len - 9).c_str(), -1, p, filename.length() * 2, NULL, NULL);
cout << p << endl;
delete [] p;
}
}
}while(FindNextFile(hFind, &d));
}
}
新着レスの表示
名前:
E-mail
(省略可)
:
※書き込む際の注意事項は
こちら
※画像アップローダーは
こちら
(画像を表示できるのは「画像リンクのサムネイル表示」がオンの掲示板に限ります)
スマートフォン版
掲示板管理者へ連絡
無料レンタル掲示板