From: Henning on
Hi all,

My VB6 exe as a service is running flawless on my dev computer w. XP Pro.

I have created a PDW install and installed it on a WindowsEmbedded (XP)
system.

There is no Form, so the only reference I have to any .ocx is:
Public WithEvents mComm As MSComm

Private Sub Class_Initialize()
Set mComm = CreateObject("MSCOMMLIB.MSCOMM")
End Sub

Private Sub Class_Terminate()
Set mComm = Nothing
End Sub

Private Sub mComm_OnComm()
Comm1_OnComm
End Sub

All dll's, tlb's and mscomm32.ocx are registered and in SharedDLLs.

What else could cause this error?

/Henning


From: Kevin Provance on

"Henning" <computer_hero(a)coldmail.com> wrote in message
news:i0bcco$176$1(a)news.eternal-september.org...
: Hi all,
:
: My VB6 exe as a service is running flawless on my dev computer w. XP Pro.
:
: I have created a PDW install and installed it on a WindowsEmbedded (XP)
: system.
:
: There is no Form, so the only reference I have to any .ocx is:
: Public WithEvents mComm As MSComm
:
: Private Sub Class_Initialize()
: Set mComm = CreateObject("MSCOMMLIB.MSCOMM")
: End Sub

I tried doing something similiar with the Winsock control once. It was a
complete disaster. I bit the bullet and used a dummy form and the control.
This was before I understood the API <eg>

--
Customer Hatred Knows No Bounds at MSFT
Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Bawwk! Paulie want a dingleball, bawwk!

From: Tony Toews on
On Tue, 29 Jun 2010 01:48:39 +0200, "Henning"
<computer_hero(a)coldmail.com> wrote:

> Set mComm = CreateObject("MSCOMMLIB.MSCOMM")

See the Serial Port Communications page at my web site.
http://www.granite.ab.ca/access/serialport.htm
for alternatives. The first is VB6 code.

Also MS has been setting the killbit recenlty for lots of older
versions of their supplied controls due to security concerns. And who
knows if more vulnerabilities will be found. To my way of thinking
removing as much external dependenceis as possible is a good thing.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
From: Phill W. on
On 29/06/2010 00:48, Henning wrote:

> My VB6 exe as a service is running flawless on my dev computer w. XP Pro.

> There is no Form, so the only reference I have to any .ocx is:
> Public WithEvents mComm As MSComm

The MSComm control /really/ doesn't like not having a Form to lounge
around on.

You /can/ use a Form in a VB6-written Service, just so long as your
Error handling is /absolutely/ air-tight. If you can do everything in
your power to prevent a dialog popping up and stalling the entire
process, then you can happily use a loaded but /non-visible/ Form!
We've had several of these running in production for over a decade, now.
(Not constantly, of course; they're on Windows boxes). ;-)

HTH,
Phill W.
From: Karl E. Peterson on
Tony Toews presented the following explanation :
> removing as much external dependenceis as possible is a good thing.

That's been my Guiding Principle for years! Amen...

--
..NET: It's About Trust!
http://vfred.mvps.org