I would like to design a function that checks a file for some text. It takes a file path, and this path can be a UNC path such as \path\to\file\share.
It will use the current users credentials as well. What I want to do is have the ability to prompt the user for new credentials to use; In pseudocode
hCreds = NULL;
if (!fAutoLogon) { hCreds = PromptForCredentials(); }
hFile = CreateFile( pszFile, GENERIC_READ, FILE_SHARE_READ ,
NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL, NULL , hCreds);
Aucun commentaire:
Enregistrer un commentaire