xiaoguozi's Blog
Pay it forword - 我并不觉的自豪,我所尝试的事情都失败了······习惯原本生活的人不容易改变,就算现状很糟,他们也很难改变,在过程中,他们还是放弃了······他们一放弃,大家就都是输家······让爱传出去,很困难,也无法预料,人们需要更细心的观察别人,要随时注意才能保护别人,因为他们未必知道自己要什么·····
#include <iostream>
#include 
<windows.h>
#include 
<iostream>
#include 
<psapi.h>
#include 
<sstream>
#include 
<fstream>

using namespace std;


int _tmain(int argc, _TCHAR* argv[],TCHAR* envp[])
{
    
//PTSTR pEnvBlock=::GetEnvironmentStrings();
    
//TCHAR szName[MAX_PATH];
    
//TCHAR szValue[MAX_PATH];
    int current=0;
    PTSTR
* pElement =(PTSTR*) envp;
    PTSTR pCurrent
=NULL;
    
while(pElement!=NULL){ 
        pCurrent
=(PTSTR)(*pElement);
        
if(pCurrent==NULL){
            pElement
=NULL;
        }
else{
            _tprintf(TEXT(
"[%u] %s\r\n"),current,pCurrent);
            current
++;
            pElement
++;
        }
    }
}
posted on 2010-04-27 10:47 小果子 阅读(231) 评论(0)  编辑 收藏 引用 所属分类: Windows

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理