Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: Active X Error Post Reply Post New Topic
Author Message
JackR
Newbie
Newbie


Joined: 06 Jan 08
Posts: 13
Quote JackR Replybullet Topic: Active X Error
    Posted: 19 Jan 09 at 1:18PM
I copied an application that I created with the Active X dll to a new PC. The application was originally created on an XP PC. The new one is a Vista PC. PDF ReDirect Pro is installed and working properly. The BatchBdf printer is installed. I tried installing version 2.2.0.5 and 2.2.0.6 of the Active X Tool. I received the same error message as listed below
Cannot create Active X component.

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Exception: Cannot create ActiveX component.
   at Microsoft.VisualBasic.Interaction.CreateObject(String ProgId, String ServerName)
   at WindowsApplication1.Form1.Button2_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
WindowsApplication3
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Users/Jack/Desktop/WindowsApplication3.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1434 (REDBITS.050727-1400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 20 Jan 09 at 2:01AM
Hi,

   This is odd, indeed. I have tested the component on Vista, so it should work.

   Have you tried running the (unmodified) sample VBA code? Do you get the same error? Your own code: what language are you using? .NET?

   best regards,


Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
JackR
Newbie
Newbie


Joined: 06 Jan 08
Posts: 13
Quote JackR Replybullet Posted: 20 Jan 09 at 11:16PM
The program is written in VB8 Express

The error is created when the program hits pdf = CreateObject("PDFR_PRO_Batch_RC.PDF_reDirect_Pro_Tool")





Dim pdf

        pdf = CreateObject("PDFR_PRO_Batch_RC.PDF_reDirect_Pro_Tool")

        Dim TempBool As Boolean

        TempBool = pdf.Batch_Printer_Load_Settings("BatchPDF")
        TempBool = pdf.Settings_Picture_Quality = 1


        pdf.settings_Master_Password = TextBox1.Text
        pdf.Settings_FileType = 1
        pdf.Settings_Encrypt_Password = TextBox2.Text
        pdf.settings_Stamps = ""
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 22 Jan 09 at 12:06AM
Hi,

When you created your project, did you create a link to the ActiveX component (ie did you set a reference)? If not, it should still work if the component is registered, which should have occurred during the installation. Nonetheless, you can try to re-run Regsvr32 to make sure.

I hope that helps,



Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
JackR
Newbie
Newbie


Joined: 06 Jan 08
Posts: 13
Quote JackR Replybullet Posted: 22 Jan 09 at 11:54PM
Hi Michel

I believe the component is registered but I tried to rerun Regsvr32. I kept on recieving an error message that stated that the module failed to load. Make sure the binary is stored at the specified path.
Which file am I running Regsrv32 on?

IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 23 Jan 09 at 10:56AM
Hello Jack,

The ActiveX component is called: ActiveX_PDF_Pro.dll

Yes, you must specify that file for the registration to work. If your Command line is not in the PDF reDirect folder, you have to enter the entire path.

To unregister, use the "/u" switch. No switch required to register.

So, at this stage, I would first confirm that the file is installed, registered, and that the demo code works OK before trying your code.

I hope this works for you.

Cheers!
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
JackR
Newbie
Newbie


Joined: 06 Jan 08
Posts: 13
Quote JackR Replybullet Posted: 23 Jan 09 at 9:46PM
Hi Michel

The dll was registerd and it the program is still not working. I am thinking that it may be a permission issue related to vista. Also, the new system is 64bit vs 32 bit. I am not a programmer. This may be a simple fix. I spent a lot of time last year writing the program. I hope that I can get it to work on my new computer. Thank you for your help.


Jack
IP IP Logged
JackR
Newbie
Newbie


Joined: 06 Jan 08
Posts: 13
Quote JackR Replybullet Posted: 24 Jan 09 at 10:50AM
Hi Michel

I figured out the problem. Thank you again for you help
See below:

VB Express Editions:
The VB and C# Express products do not expose the Target property inside the development environment. You will need to carefully modify the project file using a
text or XML editor.
1. Close the project and/or solution
2. Select Open File from the File menu
3. Navigate to the project directory, and highlight the project file
4. Press the Open button, the project file should open in the XML editor
5. Locate the first <PropertyGroup> section and add the following line:
<PlatformTarget>x86</PlatformTarget>
1. Save the project file
2. Reopen the project and/or solution using Open Project/Solution from the File menu
3. Continue with development, debugging, and testing
Alternatively, if the application is targeted to 64-bit platforms, you can ensure that the COM controls added to the application have 64-bit equivalents on the
development and deployment computers.
Issues When Using Microsoft Visual Studio 2005 http://msdn.microsoft.com/en-gb/vstudio/aa718685.aspx
1
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 24 Jan 09 at 10:03PM
Hi,

   Thanks for the update, and providing the solution which will help others. I'm still using VS2005, and have not played with the Express editions. Well done!

   Best regards,

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
Stellina99
Newbie
Newbie


Joined: 05 Feb 09
Posts: 1
Quote Stellina99 Replybullet Posted: 05 Feb 09 at 12:55AM
Hi,
The information provided by you is very useful for me. Thanks for the information. I would like to know more about it.

Snoreta


New Jobs

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum