Process problems. Active X .

When i test my activex component in
the ActiveX test container it leaves
the tstcon32 still running in the
processes. I can't get rid of that
and i don't know what i'm doing
wrong.

I was first thinking that i should lock my object so it has a strong lock. But i'm not sure if this works.

I have not done much to my project so i think it's better to tell how it is made:

MSVC++ 6.0
1. Atl Com appwizard. (everything default.)
2. New atl object->control>full control->add control based on->Listbox (every thing else is default)
3. Compile
4. Implement
::RegisterDragDrop(m_hWndList, (IDropTarget *) this);

Now the process is still in memory so that i manually must end the tstcon32 if i want to compile the program again.

5. Make my class derive from IDropTarget and add the pure virtual functions.

6. Create a destructor and add
RevokeDragDrop and DestroyWindow

What shall i do?

If you help me get rid of this problem i would be very happy.

Your sincerely
andla
LVL 1
andlaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

andlaAuthor Commented:
Edited text of question.
0
Tommy HuiEngineerCommented:
TstCon32 does not call DllCanUnloadNow() and it does not call CoFreeUnusedLibraries. But this isn't a big problem because Test Container is supposed to test a control and you should terminate it whenever you want to rebuild.

However, if you close Test Container and it doesn't terminate properly, then that is a different problem.
0
andlaAuthor Commented:
I will check out the functions you mention. When i use the same control in iexplore i can't compile it. This error occurs.

LINK : fatal error LNK1168: cannot open Debug/dragtemp.dll for writing
Error executing link.exe.

Ok i can live with the problem for a time but later on i belive this will only give me problems.

Have you tried to create the program in the same way i did?

What do you suggest?

Your sincerely
andla
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

andlaAuthor Commented:
I'm still stuck. :-(
0
vlad44Commented:
RegisterDragDrop calls AddRef() to IDropTarget. Make sure you call Release() for each AddRef().
For example:

class TDropTarget : public IDropTarget{
  ULONG m_ulRef;
public:
  TDropTarget(void):m_ulRef(1){}
....
};

after RegisterDragDrop() m_ulRef == 2, after RevokeDragDrop() m_ulRef == 1, then you need to call Release() once more.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andlaAuthor Commented:
Sorry for taking long time. I'm still a beginner to this. I feel a bit ashame because i really can't call the Release() from the destructor. I got link errors all over my head. Please give me a hint.

Your sincerely andla.
0
andlaAuthor Commented:
I tested the CoDisconnectObject and it also failed.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.