I have made a dll with VB.net, and this dll call a another dll.

Now i will test my dll in a exe program, always in vb.net.

It's working at the first execution of the exe. But when I regenerate
the exe, I can't. So I try to delete the exe in PPC, and I can't
because there a sharing violation with the exe and the two dlls.

Any idea ? What I must do in my code after calling the dll ?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

Re: Exe calling a dll by Chris

Chris
Wed Oct 06 07:27:32 CDT 2004

The EXE assembly is still loaded. Either you spawned a worker thread and
didn't kill it, or you've only minimized your Form.

-Chris


"Bnob" <bnob@bluewin.ch> wrote in message
news:mn.33087d4a1abb5231.16057@bluewin.ch...
> I have made a dll with VB.net, and this dll call a another dll.
>
> Now i will test my dll in a exe program, always in vb.net.
>
> It's working at the first execution of the exe. But when I regenerate
> the exe, I can't. So I try to delete the exe in PPC, and I can't
> because there a sharing violation with the exe and the two dlls.
>
> Any idea ? What I must do in my code after calling the dll ?
>
> --
> Ceci est une signature automatique de MesNews.
> Site : http://mesnews.no-ip.com
>



Re: Exe calling a dll by Bnob

Bnob
Wed Oct 06 09:56:28 CDT 2004

Le 06.10.2004, Chris Tacke, eMVP a supposé :
> The EXE assembly is still loaded. Either you spawned a worker thread and
> didn't kill it, or you've only minimized your Form.
>
> -Chris
>
>
> "Bnob" <bnob@bluewin.ch> wrote in message
> news:mn.33087d4a1abb5231.16057@bluewin.ch...
>> I have made a dll with VB.net, and this dll call a another dll.
>>
>> Now i will test my dll in a exe program, always in vb.net.
>>
>> It's working at the first execution of the exe. But when I regenerate
>> the exe, I can't. So I try to delete the exe in PPC, and I can't
>> because there a sharing violation with the exe and the two dlls.
>>
>> Any idea ? What I must do in my code after calling the dll ?
>>
>> --
>> Ceci est une signature automatique de MesNews.
>> Site : http://mesnews.no-ip.com

When I exit from my exe, I do a me.close. My exe is not running in the
memory.

In my dll I do a System.Threading.Thread.Sleep(200), but I don't kill
the thread.
If I must kill it, how can i do this?

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com


Re: Exe calling a dll by Dick

Dick
Wed Oct 06 12:37:24 CDT 2004

Hi,

The way that I kill a thread is to have the thread process monitor a flag
that I set when I exit the app (Closing event). If this flag is set, then I
exit the thread.

You also can use the Abort method in the threading extensions in
www.opennetcf.org.

Dick

--
Richard Grier (Microsoft Visual Basic MVP)

See www.hardandsoftware.net for contact information.

Author of Visual Basic Programmer's Guide to Serial Communications, 4th
Edition ISBN 1-890422-28-2 (391 pages) published July 2004.