Reading from a txt file
-
Hi, I have the only entry in the text file [Info] AppID=12c5cad4-3f6c-46f9-8ba7-61253cb23bec How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
You can do the following : 1. Extract the entire row and then extract text starting from '=' or 2. i do not remember the functionality of the following functions exactly but i think you can use GetPrivateProfileSectionNames () or GetPrivateProfileString ()
-
Hi, I have the only entry in the text file [Info] AppID=12c5cad4-3f6c-46f9-8ba7-61253cb23bec How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
Or use a regex package. Which language by the way.
You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)
-
Hi, I have the only entry in the text file [Info] AppID=12c5cad4-3f6c-46f9-8ba7-61253cb23bec How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
This will help you http://msdn.microsoft.com/en-us/library/4c0xfcce(VS.80).aspx[^]
-
Hi, I have the only entry in the text file [Info] AppID=12c5cad4-3f6c-46f9-8ba7-61253cb23bec How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
VKupunaram wrote:
How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
As said by kapardhi Just try these two lines :)
TCHAR szOut[MAX_PATH];
DWORD dwReturn = ::GetPrivateProfileString(_T("Info"),_T("AppID"),_T("FAILED"),szOut,MAX_PATH,_T("C:\\yourfile.txt"))You will get
"12c5cad4-3f6c-46f9-8ba7-61253cb23bec"
inszOut
-
VKupunaram wrote:
How to retrieve "12c5cad4-3f6c-46f9-8ba7-61253cb23bec" entry
As said by kapardhi Just try these two lines :)
TCHAR szOut[MAX_PATH];
DWORD dwReturn = ::GetPrivateProfileString(_T("Info"),_T("AppID"),_T("FAILED"),szOut,MAX_PATH,_T("C:\\yourfile.txt"))You will get
"12c5cad4-3f6c-46f9-8ba7-61253cb23bec"
inszOut
-
so, you voted every answer you got as Bad because you couldn't figure how to read the documentation by yourself ? The "said working" solution is what someone else suggested without providing code... Dude, help yourself, and learn reading the MSDN :zzz: And if you're about to vote for this post, take time at least to explain why you do so
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
so, you voted every answer you got as Bad because you couldn't figure how to read the documentation by yourself ? The "said working" solution is what someone else suggested without providing code... Dude, help yourself, and learn reading the MSDN :zzz: And if you're about to vote for this post, take time at least to explain why you do so
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
toxcct wrote:
so, you voted every answer you got as Bad...
Are you sure it was the OP?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
-
toxcct wrote:
so, you voted every answer you got as Bad...
Are you sure it was the OP?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
not that much, but at least, he could defend himself ?! lol
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
toxcct wrote:
so, you voted every answer you got as Bad...
Are you sure it was the OP?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
:-\ Stopped voting ! I missed a 5 :^) :laugh: just kidding.