debugging a COM dll

I have a C++ COM dll in Visual Studio 6. I want to add a simple console application project to the same workspace to call functions in the dll and be able to step through all the lines of code. How can I do this?
Who is Participating?
If you have client (exe) and server (Dll) project, you can debug server Dll by two ways:

1) From client project.
Project - Settings - Debug. Select "Additional Dlls" from combo box and add server Dll to the list. Set breakpoint in the client project, where you call server's function. Run the program using Go command. When program stopped on breakpoint, use Step Into command to debug server code.

2) From server project.
Project - Settings - Debug. Select Executable for debug session (select server exe program). Set breakpoint in the server code. Run the program using Go command. Client is executed, when it enters the server function with breakpoint, debugger stops on it.
MrNedAuthor Commented:
Great, thanks - easy when you know how!

Now sorry but I wasnt too clear in my question, but how do I call a COM dll from my c code? Ive seen examples of normal dll's but I cant get it to work.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

MrNedAuthor Commented:
That example has code like

const CLSID CLSID_CGreet = {0x242C8BCE,0x8D72,0x11D4,
const IID IID_ICGreet = {0x242C8BCD,0x8D72,0x11D4,

but I dont know where to get these numbers for the COM server component. I dont have a x_i.c file.
You can get the CLSIDs and IIDs that are resident in a DLL using the OLE View tool that is shipped with Visual studio. in OLE View, use the
File->View Tylelib option to choose your DLL. The tool will then show you then type library that is contained within the DLL. You should get whatever info you need to get started from here.

Hope this helps,
MrNedAuthor Commented:
Thanks, that got me there.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.