VC++ 获得程序运行根目录 汇编源码
2010-10-18 09:40
204 查看
代码
char *GetAppPath() { static char appPath[MAX_PATH]; __asm { push edi lea eax, appPath push LENGTH appPath push eax push 0 call dword ptr GetModuleHandle push eax call dword ptr GetModuleFileName std lea edi, appPath add edi, LENGTH appPath mov al, '\\' mov ecx, LENGTH appPath repne scasb cld mov byte ptr [edi+2], 0 pop edi }; return appPath; }
相关文章推荐
- 获得程序当前的运行目录
- VC++获得当前进程运行目录的方法
- VC 获得系统时间、程序运行时间
- vc调试或运行程序的时候指定目录
- 几个代码片段-计算程序运行时间+获得当前目录+生成MD5
- C++中用 GetModuleFileName()函数 获得程序当前的运行目录
- oracle TNS 无监听竟然跟运行目录名有关,如果目录名带有)英文右括号则程序无法获得监听的连接。
- 在程序中获得驱动器盘符的方法,附源程序,可在VC7.1下编译运行
- 用VC6调试器源码级调试win32汇编程序
- VC++编译后程序运行的当前目录?
- 在程序中获得驱动器盘符的方法,附源程序,可在VC7.1下编译运行
- VC++中如何获得一个当前进程的运行目录
- VC项目程序运行时设置指定目录读取Dll
- VC 获得系统时间、程序运行时间、…
- VC++中如何获得一个当前进程的运行目录
- evc 获得程序运行所在的目录
- VC获取系统时间、程序运行时间
- 松瀚SN8P2711 2722 ADC初始化程序及应用--汇编源码
- winform 获取当前程序运行根目录
- VC编写的程序不能在其他机器上运行的解决方案