Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
API Call Not Working
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
API Call Not Working
Miscellaneous
Thread ID:
00672210
Message ID:
00672210
Views:
43
This function returns empty on Win98 PC's. Works fine on
Win2000.
DECLARE INTEGER GetPrivateProfileString IN kernel32; 
  STRING   @sAppName,; 
  STRING   @sKeyName,; 
  STRING   @sDefault,; 
  STRING   @sReturn,; 
  INTEGER  @nSize,; 
  STRING   @sFileName 

sFileName = LOWER(GETFILE())
sSection  = "Application"
sKeyName  = "Top"
sDefault  = "(#default#)"	&& Return "(#default#)" if value is not found
iSize	  = 255			&& Size of the string
sReturn	  = SPACE(iSize)	&& String to contain the returned value

lRetVal = GetPrivateProfileString(@sSection, @sKeyName, @sDefault,;
		@sReturn, @iSize, @sFileName)

sReturn = STRTRAN(sReturn, CHR(0), "")

MESSAGEBOX(TRANSFORM(lRetVal))
MESSAGEBOX(sReturn)

RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform