Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 450947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:55:11+00:00 2026-05-12T21:55:11+00:00

I have an application that was written in VS 2005 (C#). Works fine, it

  • 0

I have an application that was written in VS 2005 (C#). Works fine, it calls a 3rd Party dll. Now that I’ve converted it to VS 2008 (using the wizard), I get the following error when trying to instantiate the 3rd party dll.

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Not sure where to even start debugging this. Can anyone point me in the right direction?

EDIT: As a side note it does the exact same thing under VS 2010.

EDIT: Both VS 2005 and VS 2008 projects using the same code target .NET 2.0 Framework

EDIt: It’s an ActiveX library called LPDFCTRLLib. I’ve simply added it under References and create a new instance of it:

public LPDFCTRLLib.LPDFWndClass olpdf = null;
//and later in my code
//...
//this is where it fails
olpdf = new LPDFCTRLLib.LPDFWndClass();

EDIT: Stack Trace

at pcl2pdf.Form1.convertPCL(String inputFile, String outputFile) in C:\junk\pcl2pdf\pcl2pdf\pcl2pdf\Form1.cs:line 29
   at pcl2pdf.Form1.Form1_Load(Object sender, EventArgs e) in C:\junk\pcl2pdf\pcl2pdf\pcl2pdf\Form1.cs:line 24
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at pcl2pdf.Program.Main() in C:\junk\pcl2pdf\pcl2pdf\pcl2pdf\Program.cs:line 17
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:55:11+00:00Added an answer on May 12, 2026 at 9:55 pm

    You should rempve the DLL and then re-Add it. Especially for an unmanaged DLL. And check with the supplier if it is compatible.

    And please note: You do not convert Projects to a VS version, except maybe for the config file. You make it target a Framework version. Your question lacks all info about Fx versions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a c# application that is using a custom DLL (written in C,
I have an application written using C++ Builder 5 that uses the TDocument class.
I have a .NET application that was written in C# and VB.NET using WinForms.
I have network application that handles about 40k msg/sec written using netty framework and
I have android application that is written regular way. layouts, java, APK. Now, depending
We have an application that is written in .NET 3.5. This app works on
I have an application that is written in VB.NET, using the System.Windows.Forms.Form as the
I have an application that is written in C# and uses a DLL written
I have an application that was originally written using iOS 3.1 Last week I
I have a WPF application that is written using MVVM Prism. It has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.