• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 455
  • Last Modified:

GetPrivateProfileString and Apostrophes

Im trying to use GetPrivateProfileString  to get 'TEST' from an INI but it keeps returning TEST  // notice there are no apostrophes.

Any ideas?

Thanks
0
tricks801
Asked:
tricks801
1 Solution
 
rockiroadsCommented:
u tried

"'TEST'"

wrap it in single quotes?

or perhaps use

chr$(39 & "TEST" & chr$(39)


I think chr$(39) is '

0
 
tricks801Author Commented:
yes, but that wasnt an easy fix. Instead I use a replace when reading/writing to the ini...Replace(myString,"'", "`")
0
 
nffvrxqgrcfqvvcCommented:
It shouldn't remove the characters from the buffer, post the code your using to get the values.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now