Skip to content

Instantly share code, notes, and snippets.

@mokapyo
Created June 10, 2016 13:48
Show Gist options
  • Save mokapyo/ce88ec024f39f69fd21aca6a39e9e2bf to your computer and use it in GitHub Desktop.
Save mokapyo/ce88ec024f39f69fd21aca6a39e9e2bf to your computer and use it in GitHub Desktop.
TCHAR buf[MAX_LINE];
FILE *fp;
_tfopen_s(&fp, _T("test.reg"), _T("r"));
while (_fgetts(buf, MAX_LINE, fp) != NULL) {
TCHAR *p = _tcsstr(buf, _T("{"));
if (p != NULL) {
CString Guid = p;
}
}
fclose(fp);
printf("Guid = %s",Guid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment