2008 October 8th Wednesday (十月 八日 水曜日)

   I can get a cold again.  Last night I can not get a good sleep.

  These days I always think what is the happiness?  There are not a certain answer.  Every one has his or her own standard.  Thare
is not a common criterion for that.  As a matter of a fact, the happiness is just a noun.  Everyone can has different definition on
occasions.  Maybe, it is just represented as an interest relation amid people.

  Yes.  I think that the root of the relation among people is interest relation.  That is a macro-interest relation, not narrow at
the relations based on money.  That is derived from our various desires.  What it is desire?

  However, I have not found out the final answer.

  I got a utility function.  It can be used to get an absolute path of the current process.  I changed it as follow.

#include  <io.h>
#include  <stdio.h>
#include  <stdlib.h>

// get an absolute path of the current process
BOOL GetCurrentProcessDirectory(char* path)
{
    char lpszFilePath[_MAX_PATH];
    if(::GetModuleFileName(NULL, lpszFilePath, _MAX_PATH) > 0){
        char szDrive[_MAX_DRIVE];
        char szFolder[_MAX_DIR];
        char szFileName[_MAX_FNAME];
        char szExt[_MAX_EXT];

        _splitpath(lpszFilePath, szDrive, szFolder, szFileName, szExt);
        sprintf(path, "%s%s", szDrive, szFolder);

        return true;
    }

    return false;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值