32bit 64bit - C# dll running on 64-bit machine -


I have created C # DLL to print PDF with Acrobat, it is called Microsoft Dynamics NAV when it comes to 32- Bit machine is run on, so this is not a problem. When we install it on a 64-bit machine, we receive the following error

The member could not invoke the printtipter. The OLE control or automation server returned the following message: The requested member is not present, or the call has attempted to set the value of the property read-only.

What can I do to run this 64-bit Windows 7 machine? I have set it to target x86, I have also tried installing installers for x86 and x64, but I'm getting the same error message.

This is my code. [ComVisible (true), Class Interface (ClassInterface Type AuDidual)] Public class CCB_Pdf Printing {Public Zero Print Printers (String Filename, String Print Name) {Process Pro = New Process (); Proc.StartInfo.CreateNoWindow = True; Proc.StartInfo.WindowStyle = Process WindowStyle.Hidden; Proc.StartInfo.FileName = @ "Acrobat.exe"; Proc.StartInfo.Arguments = "/ n / t" + Filename + "\" "+ Printer Name +" \ ""; Proc.Start (); Proc.WaitForExit (1000); Proc.closeMainWindow (); Proc.close (); }

You can also 32 bit process 64 bit on the machine

This will force your 32bit library to be used. Use

CorFlags.exe and set the / 32bit + flag (maybe as your application's post bidding step).

Comments