News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Com

Started by Tony, January 05, 2013, 05:16:14 AM

Previous topic - Next topic

Tony

Is there a good example out there of a com application written in assembly that can be recognized by other programs such as Visual Basic?  I am looking for some code to get me started on a control that can be registered and used in another application.  It has been a while since I have done assembly programming, but can still do so.

Zen

TONY,
The best site for information and source code examples in Assembly Language demonstrating COM techniques is undoubtedly:
Japheth's Site. Scroll down on the Menu panel to: COM and Assembly.

dedndave

the MSDN docs may also be helpful..
http://msdn.microsoft.com/en-us/library/windows/desktop/ms690156%28v=vs.85%29.aspx

jj2007

Tony,

Welcome to the Forum :icon14:

Go to the old Forum and search for IUnknown in posts by user Donkey. That should keep you busy for a week or so  ;)

Tony

Thanks guys, and it is welcome back, although I was probably a different user name on the old forum.  Really like RadAsm, and just getting back to doing some assembly after a long absence from it.  Looking at trying out JWasm this time.  Used Masm previously.

Biterider

Hi
If you are a VB6 user, look at ObjAsm32. There a control sample in the projects folder called OCX_Led that is able to interface with VB6.

Biterider

Tony

Tried the LED because it seemed the easiest to do.  The ocx will not register on my machine.  The one that was in the sample directory, or the one that compiles on my machine.  They do have a different number of bytes, so I am assuming that they are not quite the same.  They both yield a 0x80009e41 error.  Tried searching for the error, but it doesn't show up on an internet search. 

Forgot about windows security.  Have to second mouse click on cmd and run as admin or it doesn't allow registering of services.  Trying this allowed both it and ASMCtrl to be registered, although the LED has some errors when put on a VB form.  The ASMCtrl from Japheth appears to simply work.

Biterider

Hi
I tested the OCX on a Win7 system and got the same error (0x80009e41=SELFREG_E_CLASS) as you.
After some debugging I found that the reason is a ERROR_ACCESS_DENIED while accessing the registry.
The problem and solution are is described here http://social.msdn.microsoft.com/Forums/en-US/windowscompatibility/thread/155f81df-44c1-4b0a-bfb6-b2956881b038.

Biterider