From: Henning on

"Phill W." <p-.-a-.-w-a-r-d-@-o-p-e-n-.-a-c-.-u-k> skrev i meddelandet
news:i0fbi7$ph1$1(a)south.jnrs.ja.net...
> 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.

Hi all,
As expected there was a licensing issue. Solved it by exporting following
keys from dev. comp., then copying the .reg files to the target comp. I
guess this is what is done when installing an app with MSComm on a Form,
haven't tried that but...

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Licenses\4250E830-6AC2-11cf-8ADB-00AA00C00905]
[HKEY_CLASSES_ROOT\Licenses\4250E830-6AC2-11cf-8ADB-00AA00C00905]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSCOMMLib.MSComm]
@="Microsoft Communications Control, version 6.0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSCOMMLib.MSComm\CLSID]
@="{648A5600-2C6E-101B-82B6-000000000014}"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSCOMMLib.MSComm\CurVer]
@="MSCOMMLib.MSComm.1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSCOMMLib.MSComm.1]
@="Microsoft Communications Control, version 6.0"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\MSCOMMLib.MSComm.1\CLSID]
@="{648A5600-2C6E-101B-82B6-000000000014}"

[HKEY_CLASSES_ROOT\MSCOMMLib.MSComm]
@="Microsoft Communications Control, version 6.0"

[HKEY_CLASSES_ROOT\MSCOMMLib.MSComm\CLSID]
@="{648A5600-2C6E-101B-82B6-000000000014}"

[HKEY_CLASSES_ROOT\MSCOMMLib.MSComm\CurVer]
@="MSCOMMLib.MSComm.1"

[HKEY_CLASSES_ROOT\MSCOMMLib.MSComm.1]
@="Microsoft Communications Control, version 6.0"

[HKEY_CLASSES_ROOT\MSCOMMLib.MSComm.1\CLSID]
@="{648A5600-2C6E-101B-82B6-000000000014}"

Now things are working ok. :))

/Henning