Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 03:59:01 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Program works great on Vista/Seven... but when it's about the XP...
Pages: 1   Go Down
Print
Author Topic: Program works great on Vista/Seven... but when it's about the XP...  (Read 807 times)
0 Members and 1 Guest are viewing this topic.
Scoppio
Active Member

Offline Offline

Posts: 12


View Profile
« on: February 17, 2011, 03:04:29 PM »

Hello people,

I've started a project sometime ago and now its almost finished... "almost" because it was developed under vista and seven, but the final plataform is Windows XP

Today I tested it for the first time in the computer it will receive the program and for my surprise it didn't worked.

After some time crushing the head against the wall I realised the problem, when I call this specific and yet most important part of the code about the COM with the MACH4 the program was'nt answering:

                Mach = (Mach4.IMach4)Marshal.GetActiveObject("Mach4.Document");
                Script = (Mach4.IMyScriptObject)Mach.GetScriptDispatch();

Actually, it was... it was saying that I could not handle an HResult from this COM, but I can't even start to understand why, for real, the program/plugin works automatizing the Mach3 (entirely constructed in c#), but when I try to start a connection with the program so I can send the Script.Code( ) or any other procedure/parametre it get stuck in this ******Mach = (Mach4.IMach4)Marshal.GetActiveObject("Mach4.Document");********

Have anyone ever passed by this kind of problem? I just can't realize why this would happen. I even tried to compile the program inside the XP but it didn't worked as well.

Thanks in advance
Lucas S.Coppio
Logged
Steffen_Engel
Active Member

Offline Offline

Posts: 29

Chattanooga, TN, USA


View Profile
« Reply #1 on: February 18, 2011, 08:50:24 PM »

Hi Lucas,

Checkout the installation of Mach3 on this computer.

Under some circumstances (AFAIK depending on the version of the installer), the entries in the registry are not complete.

Check for those or insert them:

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document]
@="Mach4.Document"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Mach4.Document\CLSID]
@="{CA7992B2-2653-4342-8061-D7D385C07809}"

it should work then.

best regards,

Steffen
Logged
Scoppio
Active Member

Offline Offline

Posts: 12


View Profile
« Reply #2 on: February 21, 2011, 01:01:04 PM »

You hit the problem in its very roots! Literally!

The installer of the Mach3/4 was not creating a registry in the WinXP, no idea why... I just exported the register to a "*.reg" from my dev station and runned in the winXP test Station and it works

Thanks Steffen
Logged
woodcarver
Active Member

Offline Offline

Posts: 6


View Profile
« Reply #3 on: March 10, 2011, 02:47:55 AM »

thank you for detailed description...
after i modified the registry, it worked immediately.. thank you.
Logged
Steffen_Engel
Active Member

Offline Offline

Posts: 29

Chattanooga, TN, USA


View Profile
« Reply #4 on: March 15, 2011, 08:02:22 AM »

Hi,

i got some grey hair too, when i had this issue.

Here's a reg-file for easier adding the keys to the registry.

Steffen

* mach4reg.zip (0.35 KB - downloaded 90 times.)
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!