Teen Programmers Unite  
 

 

Return to forum top

COM Assembly programming?

Posted by mackrune [send private reply] at August 13, 2002, 10:38:18 AM

Does anyone know how to use COM in conjunction with MASM? I want to use DirectX directly through MASM, but I need help getting started.
thx

Posted by taubz [send private reply] at August 13, 2002, 03:53:44 PM

Wow... I'm sure it would be pages of messy stuff.

Posted by gian [send private reply] at August 13, 2002, 09:36:44 PM

Are you a masochist, by chance?

Posted by buzgub [send private reply] at August 14, 2002, 12:05:20 AM

Well, that would translate to a resounding no. I'll try to be slightly helpful, though.

This is waay to special purpose to expect someone here to have tried, I think. Something like a newsgroup usually has information on this, though, so you might like to search (on http://groups.google.com/) the google usenet archives.

Posted by ScaryGuy [send private reply] at August 14, 2002, 01:02:54 AM

y the hell u wanna do that?

Posted by CViper [send private reply] at August 14, 2002, 06:50:04 AM

actually there are a few demos about that kinda stuff (DirectDraw and so on) in the masm32 examples folders (if i remember it correctly)

Posted by Mike_L [send private reply] at August 24, 2002, 12:49:59 AM

I'm guessing you would want to create a C++ COM application and a separate MASM module. Create functions in your MASM module that conform to the C calling conventions. Then define these as exported functions when you assemble your module into an obj file. Then you can declare the C functions in a header file that you include in your C++ application. Linking the assembled obj into your application should allow your C++ program to call the assembly code.

I've never tried this, but I'm certain it would work. I don't know if MASM will produce a proper COFF object file that you will be able to link.

Another option may be to use inline assembly in your C++ program.

-Mike_L

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.