Sign in to follow this  
Followers 0
sab0tage

MSCOMM32.ocx & Windows 7

9 posts in this topic

I wrote a script last year that let me interrogate a barcode scanner over a COM port, using MSCOMM32.ocx. It works perfectly fine in XP, but I've got a new laptop from work to replace my old XP box, but it won't open the MSCOMM32Lib object.

I've copied over the MSCOMM32.ocx and registered it, and the registry entries for it are identical to the ones on the XP box, so that appears to be all good.

The error I get is "Variable must be of type "Object". From what I've read, MSCOMM32.ocx should work on Win7 but I'm just not having an success.

Does anyone have any idea what might be going wrong?

Regards,

Owen

Share this post


Link to post
Share on other sites



Ensure it's not 64bit Win7, and add #RequireAdmin to the top of your script. Even if you don't ultimately want to run it that way, it will point to the problem if that fixes it.

:blink:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Ensure it's not 64bit Win7, and add #RequireAdmin to the top of your script. Even if you don't ultimately want to run it that way, it will point to the problem if that fixes it.

:blink:

It's not 64bit, but I didn't try running it as administrator, which I'll try next.

Thanks for the suggestion.

Share this post


Link to post
Share on other sites

It's not 64bit, but I didn't try running it as administrator, which I'll try next.

Thanks for the suggestion.

I'm not having any luck even being run as administrator. I'm at a complete loss!

Share this post


Link to post
Share on other sites

Did you copy it to the Syswow folder?

If you didn't, try it and reregister the ocx.

Share this post


Link to post
Share on other sites

Did you copy it to the Syswow folder?

If you didn't, try it and reregister the ocx.

I don't appear to have a syswow folder, is it not only required if running the 64-bit version of Windows 7 (or vista)?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Are you talking about SysWOW64? That's where x64 Windows have the x86 files (the x64 files go to System32).

Edit: And it has nothing to do with Vista or 7. Don't know how you came to that conclusion.

Edited by AdmiralAlkex

Share this post


Link to post
Share on other sites

Are you talking about SysWOW64? That's where x64 Windows have the x86 files (the x64 files go to System32).

Edit: And it has nothing to do with Vista or 7. Don't know how you came to that conclusion.

I have the 32-bit version of Windows 7, not 64. The drivers are also 32-bit and have been placed in the \system32 directory and have been registered successfully (apparently) with regsrv32. I've even looked at the threads while running on an XP box with process explorer to make sure it's not calling any unusual dlls that might be missing, but no joy.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

You have to actually install VB6 to get that dll to function on Windows according to some other posts. I have since moved to a different solution though. Someone on the forums made a dll and UDF though that has worked pretty good for me on Windows 7. http://www.autoitscript.com/forum/index.php?s=&showtopic=45842&view=findpost&p=341916

Edited by wkain1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0