Attempted to read or write protected memory

Ask a Question related to Adobe Acrobat SDK, Design and Development.

  1. #1

    Default Attempted to read or write protected memory

    I am attempting to convert a PDF document into a jpg image. I have the code in place and understand how it works:

    Dim a As New Acrobat.AcroPDDoc()
    Dim jso As Object
    If a.Open(C:\doc.pdf") Then
    jso = a.GetJSObject
    jso.SaveAs("c:\test.jpg", "com.adobe.acrobat.jpeg")
    End If
    a.Close()

    But I am getting a memory error when it tries to execute the "a.Open" statement. The memory error is "Attempted to read or write protected memory..." I cannot find a solution for this anywhere. Can anyone help? Thanks.

    Matt Spinks
    Matt_Spinks@adobeforums.com Guest

  2. Similar Questions and Discussions

    1. $& write-protected?
      I am working on a regexp engine written entirely in Ruby. I wish to test it against the rubicon testsuite, its using $& and $1-$9 heavily. How...
    2. File system get auto change from read-write to read-oly
      I have a very strange file system with OS Redhat 7.2 The file system is read-write, but some how it randomly changes to read-only at any time....
    3. Modification of a read-only value attempted
      Hello all, I'm trying to open a file (3 separate files anyway) and iterate through them In this portion of my script: foreach...
    4. Read & Read/Write Groups
      I am trying to achieve a solution to a (hopefully) simple scenario. I have a Solaris 9 server that is going to be used for sharing files. I...
  3. #2

    Default Re: Attempted to read or write protected memory

    What version of Acrobat on what OS platform?
    Leonard_Rosenthol@adobeforums.com Guest

  4. #3

    Default Re: Attempted to read or write protected memory

    Acrobat 9
    Visual Studio 2008
    ..NET 3.5
    Windows XP Professional
    Matt_Spinks@adobeforums.com Guest

  5. #4

    Default Re: Attempted to read or write protected memory

    I believe you need to instantiate the app before the document. Have you checked the sample code?
    Leonard_Rosenthol@adobeforums.com Guest

  6. #5

    Default Re: Attempted to read or write protected memory

    Yes and yes. I have looked at the code and I have also tried instanciating the app first. My code looks basically the same as the sample code with different file names, etc. I have even tried running the sample directly from the included solution within VS2008 and I get the same error on the "open" statement.

    Matt
    Matt_Spinks@adobeforums.com Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139