我用vc写了一个数据库连接的com组件,用在asp中,但是有配置文件来指示com的指向
,在组建中使用的取得配置文件的路经的语句为
GetModuleFileName(m_hInstance, szFilePath, sizeof(szFilePath));
for(lpTemp = szFilePath + lstrlen(szFilePath);
*(lpTemp - 1) != \\; lpTemp--);
lstrcpy(lpTemp, "");
CString tmp=szFilePath;
CString strINIFile=tmp + "dbagency.ini";
那么在asp中使用时应该将配置文件放到什么地方?????????
在线等待!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
用GetModuleFileName能取得IE浏览器文件的路径么????
向楼主学习!!向楼主学习!!向楼主学习!!向楼主学习!!向楼主学习!!向楼主学习!!向楼主学习!!向楼主学习!!
GetModuleFileName取到的就是m_hInstance模块的编对路径。 如果要取得加载DLL的EXE的路径,直接用GetModuleFileName(NULL)就是了。
GetModuleFileName 的第一个参数:
hModule
[in] Handle to the module whose file name is being requested. If this parameter is NULL, GetModuleFileName returns the path for the file containing the current process.