How to Restore Encrypted Files
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: How to Restore Encrypted Files

  1. #1
    Join Date
    Jul 2004
    Posts
    222

    How to Restore Encrypted Files

    Hi Guru's

    I want to restore encrypted file. For that i am using WriteEncryptedFileRaw API. When I am writting code in C- style it is working fine but same code is not working in c++ style code.

    I am working in vc++ 6.0 under Windows 2000 professional.

    Any body have any idea please help me.


    Thank in advance

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,060

    Re: How to Restore Encrypted Files

    Way too few details to say anything sensible...

    Please post some code.
    Do you get compilation errors using the "C++ style"? Or runtime errors?

  3. #3
    Join Date
    Jul 2004
    Posts
    222

    Re: How to Restore Encrypted Files

    Hi Marc
    In a Application, i Call function WriteEncryptedFileRaw .
    DWORD ii = WriteEncryptedFileRaw(&WriteCallback, &hf, pvContext) ;

    It gives error code 1917.

    DWORD WINAPI WriteCallback(PBYTE pbData, PVOID pvCallbackContext, PULONG ulLength)
    {
    HANDLE *phRawFile=(HANDLE *)pvCallbackContext;

    unsigned long nBytesRead=0;

    bool bStop=false;

    if(!ReadFile(*phRawFile,(LPVOID)pbData,*ulLength,&nBytesRead,0))
    {
    bStop=true;
    }
    *ulLength=nBytesRead;
    // nTotalBytes+=nBytesRead;
    printf("\n %u", nBytesRead);
    return bStop;
    }


    How i solve the problem ........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center