function cGetStartupPath local buf, nlen if _VFP.StartMode#0 && if not development if _vfp.StartMode=4 && normal EXE return left(sys(16,0),rat("\",sys(16,0),1)) else && OLE LOCAL buf, nlen, cdir buf=space(400) DECLARE INTEGER GetModuleFileName in win32api Integer,String @,Integer * As an EXE or DLL, we need to find the home directory, * not the curdir() and not * the dir of the runtime. The classlibrary property shows this for PRGs, but not VCXs IF _vfp.startmode = 3 or _vfp.startmode = 5 && inproc dll DECLARE INTEGER GetModuleHandle in win32api String nlen=GetModuleFileName(GetModuleHandle(this.cOLEserverName),@buf,len(buf)) ELSE nlen=GetModuleFileName(0,@buf,len(buf)) ENDIF buf = LEFTC(buf,nlen) return LEFTC(buf,RATC('\',buf)) endif else return addbs(SYS(5)+SYS(2003)) && previously we set default!!!! endif