Hello,

i want to decrypt the files from the TEXT("\\My Documents\\sample\\

it has several *.enc files

i want to decrypt one by one

say

test.enc
test1.enc

should be decrypted and saved as

test.wmv
test1.wmv

respectively

i have tried with the following code..

it dint work..it is not taking *.enc as file name

how can i do this??

--
Thanks

Arvind



===========
BOOL DecryptFile (LPTSTR, LPTSTR, PCHAR);


int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
char *pAnsiString = "pass";
PCHAR lpszPassword = pAnsiString;


WIN32_FIND_DATA sfd;

LPTSTR lpszSF = TEXT("\\My Documents\\sample\\*.enc");
LPTSTR lpszDN = TEXT("\\My Documents\\sample\\test.WMV");

HANDLE h = FindFirstFile( lpszSF, &sfd );
if ( h != INVALID_HANDLE_VALUE )
{
do
{
if (!DecryptFile (lpszSF, lpszDN, lpszPassword))
{
MessageBeep(MB_ICONQUESTION);
return 1;
}
}
while ( FindNextFile( h, &sfd ) );
}

return 0;
}

--
"eRiva Systems" - Where Technology Meets Life, Every Minute.

arvindr@erivasystems.com

www.erivasystems.com

--
"eRiva Systems" - Where Technology Meets Life, Every Minute.

arvindr@erivasystems.com

www.erivasystems.com