How to register a COM dll?

  • Thread starter Thread starter Felix Joachim
  • Start date Start date
F

Felix Joachim

Hi,

I've written an ActiveX/COM component that is supposed to run in a .Net
2.0 webbrowser component.
Is there some easy way to register the COM dll with .Net?

So far I've only found examples that do that with embedded c.

bye,
felix
 
Set a COM reference to your registered control / component and .NET
will generate a Runtime Callable Wrapper (RCW) assembly for it. You can
then program against this in any .NET Framework language.
 
Web browser will instantiate a COM component by CLSID or ProgID as usually.
I suggest that you create a cab with your activeX component an install it on
target device. There are samples in SDK on how to create an .inf file and a
cab that registers a component. There is nothing .NET-specific to it
 
Hi,

I've installed the PocketPC 2002 SDK and couldn't find much information
about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp has
some information, I'm not sure how to create the cab file for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix
 
A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================-- Alex
Feinman---Visit http://www.opennetcf.org"Felix Joachim said:
Hi,

I've installed the PocketPC 2002 SDK and couldn't find much information
about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp has
some information, I'm not sure how to create the cab file for a PPC
though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll. It
automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator or
my PPC though and wouldn't be too convenient when deploying the component
later.

bye,
felix

Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component an
install it on target device. There are samples in SDK on how to create an
.inf file and a cab that registers a component. There is nothing
.NET-specific to it
 
Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix

A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file for a
PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix

Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
Hi,

I finally got around to downloading more SDKs and got a regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not found.
....

I've created the dll as a Windows Control Library project with VS 2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)

felix



Felix said:
Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix

A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE
3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for
StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root
list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file for a
PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with the
dll. It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file
then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the
emulator or my PPC though and wouldn't be too convenient when
deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:

Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
The DLL is not set up for self-registration, then. That function should be
exported from any COM DLL that knows how to register itself.

Paul T.

Felix Joachim said:
Hi,

I finally got around to downloading more SDKs and got a regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not found.
...

I've created the dll as a Windows Control Library project with VS 2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)

felix



Felix said:
Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix

A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE
3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE
3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for
StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root
list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"

Hi,

I've installed the PocketPC 2002 SDK and couldn't find much information
about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp has
some information, I'm not sure how to create the cab file for a PPC
though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file
then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix


Alex Feinman [MVP] wrote:

Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
Hi,
that's what I thought, I haven't found an example about how to implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom setup.dll

I would still need a self registering control, right?

felix


The DLL is not set up for self-registration, then. That function should be
exported from any COM DLL that knows how to register itself.

Paul T.

Hi,

I finally got around to downloading more SDKs and got a regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not found.
...

I've created the dll as a Windows Control Library project with VS 2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)

felix



Felix said:
Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix


Alex Feinman [MVP] wrote:


A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE
3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE
3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for
StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root
list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"


Hi,

I've installed the PocketPC 2002 SDK and couldn't find much information
about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp has
some information, I'm not sure how to create the cab file for a PPC
though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file
then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix


Alex Feinman [MVP] wrote:


Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
..Net controls are *not* COM controls, and don't need to be registered.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


Felix Joachim said:
Hi,
that's what I thought, I haven't found an example about how to implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom setup.dll

I would still need a self registering control, right?

felix


The DLL is not set up for self-registration, then. That function should
be exported from any COM DLL that knows how to register itself.

Paul T.

Hi,

I finally got around to downloading more SDKs and got a regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not found.
...

I've created the dll as a Windows Control Library project with VS 2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)

felix



Felix Joachim wrote:

Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix


Alex Feinman [MVP] wrote:


A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE
3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE
3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for
StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root
list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"


Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file for a
PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file
then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix


Alex Feinman [MVP] wrote:


Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
Is there a way to load the control in Pocket IE without registering it?

felix


.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's do a case study. Email us at d c s @ o p e n n e t c f . c o m http://www.opennetcf.org/donate "Felix Joachim said:
Hi,
that's what I thought, I haven't found an example about how to implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:
The DLL is not set up for self-registration, then. That function should
be exported from any COM DLL that knows how to register itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not found.
...

I've created the dll as a Windows Control Library project with VS 2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)

felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to use it
in a website?
I would of course have to replace some names, but I can't see where the
lines I added to the generated file (clsid, FileVersion and so on) have
gone.

I would still be glad if somebody could send me a pointer to a website
which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of Windows CE
3.0
VersionMax = 4.99 ; Specifies maximum version of Windows CE
3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type for
StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to copy
AddReg = RegSettings ; Points to RegSettings for registry root
list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file for a
PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with the dll.
It automatically adds some files then (System.Windows.Forms.dll,
System.Xml.dll, System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project inf-file
then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the embedded
Toolkit, it can't be that hard. ;)

I suppose I could use regsrvce.exe, it's not installed on the emulator
or my PPC though and wouldn't be too convenient when deploying the
component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or ProgID as
usually. I suggest that you create a cab with your activeX component
an install it on target device. There are samples in SDK on how to
create an .inf file and a cab that registers a component. There is
nothing .NET-specific to it
 
I'm confused. Compact Framework controls cannot be loaded into web pages at
all. COM objects must be registerd for client-side use.

-Chris



Felix Joachim said:
Is there a way to load the control in Pocket IE without registering it?

felix


.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's do a
case study. Email us at d c s @ o p e n n e t c f . c o m
Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with VS
2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to
use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid, FileVersion
and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type
for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to
copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to
copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num
= 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file
for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with
the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the
embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on the
emulator or my PPC though and wouldn't be too convenient when
deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with your
activeX component an install it on target device. There are
samples in SDK on how to create an .inf file and a cab that
registers a component. There is nothing .NET-specific to it
 
It's a Windows Control, I had no problem using it in IE 6 (like an
ActiveX control) since Visual Studio adds the needed entries to the
registry by itself.
That's the code I used to load the control on WinXP:
<object classid="clsid:E3BD4470-A21F-30B7-8043-9D5ADA266EC4"
id="MiniSig" width="288" height="192"></object>

I think somebody here told me that it would be possible to use it in
PocketIE too...

If that's not possible it would be really nice if you could point me in
the right direction.

felix


I'm confused. Compact Framework controls cannot be loaded into web pages at
all. COM objects must be registerd for client-side use.

-Chris



Is there a way to load the control in Pocket IE without registering it?

felix



.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's do a
case study. Email us at d c s @ o p e n n e t c f . c o m
in message

Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with VS
2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered to
use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid, FileVersion
and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type
for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files to
copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to
copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames disk_id_num
= 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab file
for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project with
the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the
embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on the
emulator or my PPC though and wouldn't be too convenient when
deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with your
activeX component an install it on target device. There are
samples in SDK on how to create an .inf file and a cab that
registers a component. There is nothing .NET-specific to it
 
Ok, so now we're getting somewhere. Desktop code cannot be run in CE.
Period. There are many reasons for this (wrong processor, less APIs
supported by the OS, etc). If you have the source, you may be able to port
it to CE, but it might be a lot of work.

-Chris



Felix Joachim said:
It's a Windows Control, I had no problem using it in IE 6 (like an ActiveX
control) since Visual Studio adds the needed entries to the registry by
itself.
That's the code I used to load the control on WinXP:
<object classid="clsid:E3BD4470-A21F-30B7-8043-9D5ADA266EC4" id="MiniSig"
width="288" height="192"></object>

I think somebody here told me that it would be possible to use it in
PocketIE too...

If that's not possible it would be really nice if you could point me in
the right direction.

felix


I'm confused. Compact Framework controls cannot be loaded into web pages
at all. COM objects must be registerd for client-side use.

-Chris



Is there a way to load the control in Pocket IE without registering it?

felix




.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's do
a case study. Email us at d c s @ o p e n n e t c f . c o m
in message

Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with VS
2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered
to use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid,
FileVersion and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type
for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files
to copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to
copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required
section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames
disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab
file for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project
with the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the
embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on
the emulator or my PPC though and wouldn't be too convenient
when deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with
your activeX component an install it on target device.
There are samples in SDK on how to create an .inf file and
a cab that registers a component. There is nothing
.NET-specific to it
 
The control isn't too complicated. It's purpose is to record a
signature, so it saves the cursor positions and displays that, when
finished it saves a gif image. I have the source code.

I can't find a .Net 1 Smart Device Control Library project right now.
Is it possible to use a .Net 2.0 Smart Device Control Library project to
do this in .Net or would I have to use eVC?

bye,
felix


Ok, so now we're getting somewhere. Desktop code cannot be run in CE.
Period. There are many reasons for this (wrong processor, less APIs
supported by the OS, etc). If you have the source, you may be able to port
it to CE, but it might be a lot of work.

-Chris



It's a Windows Control, I had no problem using it in IE 6 (like an ActiveX
control) since Visual Studio adds the needed entries to the registry by
itself.
That's the code I used to load the control on WinXP:
<object classid="clsid:E3BD4470-A21F-30B7-8043-9D5ADA266EC4" id="MiniSig"
width="288" height="192"></object>

I think somebody here told me that it would be possible to use it in
PocketIE too...

If that's not possible it would be really nice if you could point me in
the right direction.

felix


I'm confused. Compact Framework controls cannot be loaded into web pages
at all. COM objects must be registerd for client-side use.

-Chris





Is there a way to load the control in Pocket IE without registering it?

felix





.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's do
a case study. Email us at d c s @ o p e n n e t c f . c o m
in message


Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the wrong
way, too.
What I have now is a .Net Control that draws some stuff and then saves
that as a gif image. It's supposed to run on a Pocket PC in Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with VS
2003.
I tried to solve the problem by following the steps from this url
(Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for dlls
programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB file?

Is the .inf example below enough to get the control registered
to use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid,
FileVersion and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value type
for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for files
to copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to
copy
CESelfRegister = MyControl.dll ; Specifies custom setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required section

[Shortcuts1.SA]

[SourceDisksNames] ; Required
section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames
disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find much
information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab
file for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project
with the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with the
embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on
the emulator or my PPC though and wouldn't be too convenient
when deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with
your activeX component an install it on target device.
There are samples in SDK on how to create an .inf file and
a cab that registers a component. There is nothing
.NET-specific to it
 
Once again, PIE cannot host managed code, so it must be written as a C++ COM
control. A desktop version will not work, it must be written and compiled
for CE.

-Chris

Felix Joachim said:
The control isn't too complicated. It's purpose is to record a signature,
so it saves the cursor positions and displays that, when finished it saves
a gif image. I have the source code.

I can't find a .Net 1 Smart Device Control Library project right now.
Is it possible to use a .Net 2.0 Smart Device Control Library project to
do this in .Net or would I have to use eVC?

bye,
felix


Ok, so now we're getting somewhere. Desktop code cannot be run in CE.
Period. There are many reasons for this (wrong processor, less APIs
supported by the OS, etc). If you have the source, you may be able to
port it to CE, but it might be a lot of work.

-Chris



It's a Windows Control, I had no problem using it in IE 6 (like an
ActiveX control) since Visual Studio adds the needed entries to the
registry by itself.
That's the code I used to load the control on WinXP:
<object classid="clsid:E3BD4470-A21F-30B7-8043-9D5ADA266EC4" id="MiniSig"
width="288" height="192"></object>

I think somebody here told me that it would be possible to use it in
PocketIE too...

If that's not possible it would be really nice if you could point me in
the right direction.

felix


<ctacke/> wrote:

I'm confused. Compact Framework controls cannot be loaded into web
pages at all. COM objects must be registerd for client-side use.

-Chris





Is there a way to load the control in Pocket IE without registering it?

felix





.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's
do a case study. Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate "Felix Joachim" <[email protected]>
wrote in message



Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the
wrong way, too.
What I have now is a .Net Control that draws some stuff and then
saves that as a gif image. It's supposed to run on a Pocket PC in
Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with
VS 2003.
I tried to solve the problem by following the steps from this
url (Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for
dlls programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB
file?

Is the .inf example below enough to get the control registered
to use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid,
FileVersion and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value
type for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for
files to copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files
to copy
CESelfRegister = MyControl.dll ; Specifies custom
setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required
section

[Shortcuts1.SA]

[SourceDisksNames] ; Required
section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames
disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find
much information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab
file for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project
with the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with
the embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on
the emulator or my PPC though and wouldn't be too
convenient when deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with
your activeX component an install it on target device.
There are samples in SDK on how to create an .inf file
and a cab that registers a component. There is nothing
.NET-specific to it
 
I'm not sure if you already wrote that here, thanks for the clear answer
though. Now I can find out what to do next.

Can you tell me why it's possible to use managed code in the big IEs
(WinXP) but not with the CF?

felix


Once again, PIE cannot host managed code, so it must be written as a C++ COM
control. A desktop version will not work, it must be written and compiled
for CE.

-Chris

The control isn't too complicated. It's purpose is to record a signature,
so it saves the cursor positions and displays that, when finished it saves
a gif image. I have the source code.

I can't find a .Net 1 Smart Device Control Library project right now.
Is it possible to use a .Net 2.0 Smart Device Control Library project to
do this in .Net or would I have to use eVC?

bye,
felix


Ok, so now we're getting somewhere. Desktop code cannot be run in CE.
Period. There are many reasons for this (wrong processor, less APIs
supported by the OS, etc). If you have the source, you may be able to
port it to CE, but it might be a lot of work.

-Chris





It's a Windows Control, I had no problem using it in IE 6 (like an
ActiveX control) since Visual Studio adds the needed entries to the
registry by itself.
That's the code I used to load the control on WinXP:
<object classid="clsid:E3BD4470-A21F-30B7-8043-9D5ADA266EC4" id="MiniSig"
width="288" height="192"></object>

I think somebody here told me that it would be possible to use it in
PocketIE too...

If that's not possible it would be really nice if you could point me in
the right direction.

felix


<ctacke/> wrote:


I'm confused. Compact Framework controls cannot be loaded into web
pages at all. COM objects must be registerd for client-side use.

-Chris






Is there a way to load the control in Pocket IE without registering it?

felix






.Net controls are *not* COM controls, and don't need to be registered.

-- Chris Tacke Co-founder OpenNETCF.org Are you using the SDF? Let's
do a case study. Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate "Felix Joachim" <[email protected]>
wrote in message




Hi,
that's what I thought, I haven't found an example about how to
implement
DllRegisterServer with .Net yet.

I worry a bit about this since I get the feeling of doing it the
wrong way, too.
What I have now is a .Net Control that draws some stuff and then
saves that as a gif image. It's supposed to run on a Pocket PC in
Pocket IE.


If I built a CAB file with these options:
[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files to copy
CESelfRegister = WindowsControlLibrary4.dll ; Specifies custom
setup.dll

I would still need a self registering control, right?

felix



Paul G. Tobey [eMVP] wrote:

The DLL is not set up for self-registration, then. That function
should be exported from any COM DLL that knows how to register
itself.

Paul T.



Hi,

I finally got around to downloading more SDKs and got a
regsvrce.exe.

After trying to register the dll I get this error message:
x.dll was loaded but the DllRegisterServer entry point was not
found.
...

I've created the dll as a Windows Control Library project with
VS 2003.
I tried to solve the problem by following the steps from this
url (Packaging an Assembly for COM).
http://msdn.microsoft.com/library/d...cpguide/html/cpconpackagingassemblyforcom.asp

After searching with google I couldn't find any solution for
dlls programmed with .Net, not sure what to do now.

Help! ;)
felix



Felix Joachim wrote:


Thanks Alex.

I'm not really sure about two things now.
Is a Smart Device Cab project a good way to create the CAB
file?

Is the .inf example below enough to get the control registered
to use it in a website?
I would of course have to replace some names, but I can't see
where the lines I added to the generated file (clsid,
FileVersion and so on) have gone.

I would still be glad if somebody could send me a pointer to a
website which discusses this topic.

felix


Alex Feinman [MVP] wrote:



A sample .inf file will look like this:

=========================================================
[Version] ; Required section
Signature = "$Windows NT$"
Provider = "Microsoft"
CESignature = "$Windows CE$"

[CEStrings] ; Required section
AppName = "My ActiveX Control"
InstallDir = %CE1%\%AppName% ; Install in \Program
Files\app_name

[CEDevice] ; Optional
UnsupportedPlatforms = "HPC","Jupiter","Palm PC"
VersionMin = 3.0 ; Specifies minimum version of
Windows CE 3.0
VersionMax = 4.99 ; Specifies maximum version of
Windows CE 3.0

[CEDevice.SA]
ProcessorType = 2577 ; Specifies processor value
type for StrongARM

[DefaultInstall] ; Required section
CopyFiles = Files.Common ; Points to Files.Common for
files to copy
AddReg = RegSettings ; Points to RegSettings for
registry root list

[DefaultInstall.SA]
CopyFiles = Files.SA ; Points to Files.SA for files
to copy
CESelfRegister = MyControl.dll ; Specifies custom
setup.dll

[Files.Common] ; Required section

[Files.SA]
MyControl.dll,,,0

[RegSettings] ; Required
section

[Shortcuts1.SA]

[SourceDisksNames] ; Required
section
1 = ,"Common files",,.
[SourceDisksNames.SA]
2 = ,"SA files",,ARM


[SourceDisksFiles] ; Required section

[SourceDisksFiles.SA]
MyControl.dll = 2 ; Use SourceDisksNames
disk_id_num = 2

[DestinationDirs] ; Required section
Files.Common = 0,%InstallDir% ; Install in \Program
Files\app_name
Files.SA = 0,%InstallDir%
=====================================================================--
Alex Feinman---Visit http://www.opennetcf.org"Felix Joachim"



Hi,

I've installed the PocketPC 2002 SDK and couldn't find
much information about how to make an inf file.

http://msdn.microsoft.com/workshop/components/activex/packaging.asp
has some information, I'm not sure how to create the cab
file for a PPC though.

I've tried to create a .Net 2.0 Smart Device CAB project
with the dll. It automatically adds some files then
(System.Windows.Forms.dll, System.Xml.dll,
System.Runtime.Serialization.Formatters.Soap.dll,
Accessibility.dll, System.dll, System.Drawing.dll).

I added some entries from the url above to the CAB-project
inf-file then:
[Files.Common1]
"WindowsControlLibrary4.dll","WindowsControlLibrary4.dll",,0
clsid={E3BD4470-A21F-30B7-8043-9D5ADA266EC4}
FileVersion=1.0.2016.18533
RegisterServer=yes
[Files.Common2]
"System.Windows.Forms.dll","System.Windows.Forms.dll",,0

This doesn't work though.

Either I don't get something or this is mostly done with
the embedded Toolkit, it can't be that hard. ;)
I suppose I could use regsrvce.exe, it's not installed on
the emulator or my PPC though and wouldn't be too
convenient when deploying the component later.

bye,
felix


Alex Feinman [MVP] wrote:



Web browser will instantiate a COM component by CLSID or
ProgID as usually. I suggest that you create a cab with
your activeX component an install it on target device.
There are samples in SDK on how to create an .inf file
and a cab that registers a component. There is nothing
.NET-specific to it
 
The Compact framework does not implement the run-time hosting functionality
necessary to allow anyone to implement control hosting in any application,
not just PIE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top