Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data paths in COM
Message
From
06/04/2000 00:50:45
 
 
To
05/04/2000 07:27:13
Scott Knight
Human Resources Development Canada
St. John's, Newfoundland, Canada
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00355583
Message ID:
00356094
Views:
17
Try this:
IF _VFP.STARTMODE > 1
   LOCAL lcBuffer, lnLen
   DECLARE INTEGER GetPrivateProfileString in win32api String,String,String,String @,Integer,String

   WITH This
        lcBuffer = SPACE(400)
        DECLARE INTEGER GetModuleFileName IN win32api Integer,String @,Integer

        IF _VFP.STARTMODE = 3
           DECLARE INTEGER GetModuleHandle IN win32api String
           lnLen = Getmodulefilename(GetModuleHandle(.cServerName + ".dll"), @lcBuffer, LEN(lcBuffer))
        ELSE
           lnLen = Getmodulefilename(0, @lcBuffer, LEN(lcBuffer))
        ENDIF

        lcBuffer     = LEFTC(lcBuffer, lnLen)
        .cDirectory  = LEFTC(lcBuffer, RATC('\', lcBuffer) - 1)
        .cServerName = LEFTC(SUBSTRC(lcBuffer, RATC('\', lcBuffer) + 1), AT_C(".", .cServerName) -1)
   ENDWITH
ENDIF
- Jeff
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform