Registering ActiveX on .NET CF emulator

P

Praveen

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the device
after registering the activeX on the device by building it from embedded
VC++. If I have to test it on emulator how do I register the activeX on the
..NET emulator which is different from the eVC emulator. Should I write a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 
P

Praveen

Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420 emulator. But
I have a application that is created in C# and it tested on the default .NET
emulator. I was looking if there is a way to run it on the 'Windows CE .NET
(default)emulator'.

Regards.
-P
Mark Arteaga said:
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK for the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.
--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


Praveen said:
Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the device
after registering the activeX on the device by building it from embedded
VC++. If I have to test it on emulator how do I register the activeX on the
..NET emulator which is different from the eVC emulator. Should I write a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 
C

Chris Tacke, eMVP

You cannot create ActiveX components for smart devices with managed code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Praveen said:
Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420 emulator. But
I have a application that is created in C# and it tested on the default ..NET
emulator. I was looking if there is a way to run it on the 'Windows CE ..NET
(default)emulator'.

Regards.
-P
Mark Arteaga said:
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK for the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.
--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


Praveen said:
Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the device
after registering the activeX on the device by building it from embedded
VC++. If I have to test it on emulator how do I register the activeX
on
write
 
P

Praveen

Yes. I understand. Let me explain in detail. I have an ATL activeX dll
developed in eVC. I have a managed application where I use a web browser
control. I want to create the activeX object instance from the web browser
control on a particular event. I am trying to test this scenario in the .NET
default emulator. I have the activeX dll part of the managed project and the
issue I am faced with is to figure out a way to register the activeX in the
..NET default emulator before instantiating the object. Because it is not
registered the instantiation of the activeX object always fails.

Is there a way ? Did I make it clear ?

Thank you for the response.


Chris Tacke said:
You cannot create ActiveX components for smart devices with managed code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Praveen said:
Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420 emulator. But
I have a application that is created in C# and it tested on the default .NET
emulator. I was looking if there is a way to run it on the 'Windows CE .NET
(default)emulator'.

Regards.
-P
Mark Arteaga said:
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK for the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.
--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the device
after registering the activeX on the device by building it from embedded
VC++. If I have to test it on emulator how do I register the
activeX
 
P

Paul G. Tobey [eMVP]

Is the ActiveX self-registering, as most are? You should be able to
LoadLibrary() it, GetProcAddress() it for its DLLRegisterServer routine, and
then call that function, finishing up with a FreeLibrary(). However, I
don't think that you can call from managed code through a function pointer
(although I could definitely be wrong about that).

If you can't, you'll have to, at least, write a DLL that will perform the
operations above via an exported function and call that function from your
managed code. Are you sure that just writing all this registration code in
unmanaged code isn't the best way instead?

Paul T.

Praveen said:
Yes. I understand. Let me explain in detail. I have an ATL activeX dll
developed in eVC. I have a managed application where I use a web browser
control. I want to create the activeX object instance from the web browser
control on a particular event. I am trying to test this scenario in the ..NET
default emulator. I have the activeX dll part of the managed project and the
issue I am faced with is to figure out a way to register the activeX in the
.NET default emulator before instantiating the object. Because it is not
registered the instantiation of the activeX object always fails.

Is there a way ? Did I make it clear ?

Thank you for the response.


Chris Tacke said:
You cannot create ActiveX components for smart devices with managed code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Praveen said:
Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420
emulator.
But
I have a application that is created in C# and it tested on the
default
.NET
emulator. I was looking if there is a way to run it on the 'Windows CE .NET
(default)emulator'.

Regards.
-P
"Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK for the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.

--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the
device
after registering the activeX on the device by building it from embedded
VC++. If I have to test it on emulator how do I register the
activeX
on
the
..NET emulator which is different from the eVC emulator. Should I write
a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 
P

Praveen

Thank you for the inputs. If I could get the DLL to self register on the
emulator, as it should, that is the best option I have. But I don't see that
happening. I don't know if I am missing something here. All I do is add the
compiled ATL activeX DLL into the managed to project by adding it as an
existing item. Then the function inside the ActiveX dll is invoked via
Javascript in the hope that it would have been self-registered. But
unfortunately it is not and I get an error as "missing method exception". I
wonder what self-registering really means !

The other idea of writing another DLL for the sake of registering the
activeX is one I will find hard to convince others, leave alone myself.

That will lead me to decide that may be this could not be done on the .NET
default emulator. But I want to see if there is a way to do it before I
conclude.

Thank you.
-Praveen

Paul G. Tobey said:
Is the ActiveX self-registering, as most are? You should be able to
LoadLibrary() it, GetProcAddress() it for its DLLRegisterServer routine, and
then call that function, finishing up with a FreeLibrary(). However, I
don't think that you can call from managed code through a function pointer
(although I could definitely be wrong about that).

If you can't, you'll have to, at least, write a DLL that will perform the
operations above via an exported function and call that function from your
managed code. Are you sure that just writing all this registration code in
unmanaged code isn't the best way instead?

Paul T.

Praveen said:
Yes. I understand. Let me explain in detail. I have an ATL activeX dll
developed in eVC. I have a managed application where I use a web browser
control. I want to create the activeX object instance from the web browser
control on a particular event. I am trying to test this scenario in the .NET
default emulator. I have the activeX dll part of the managed project and the
issue I am faced with is to figure out a way to register the activeX in the
.NET default emulator before instantiating the object. Because it is not
registered the instantiation of the activeX object always fails.

Is there a way ? Did I make it clear ?

Thank you for the response.


Chris Tacke said:
You cannot create ActiveX components for smart devices with managed code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420 emulator.
But
I have a application that is created in C# and it tested on the default
.NET
emulator. I was looking if there is a way to run it on the 'Windows CE
.NET
(default)emulator'.

Regards.
-P
"Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK
for
the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.

--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the
device
after registering the activeX on the device by building it from
embedded
VC++. If I have to test it on emulator how do I register the activeX
on
the
..NET emulator which is different from the eVC emulator. Should I
write
a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 
P

Praveen

Thank you for the inputs. If I could get the DLL to self register on the
emulator, as it should, that is the best option I have. But I don't see that
happening. I don't know if I am missing something here. All I do is add the
compiled ATL activeX DLL into the managed to project by adding it as an
existing item. Then the function inside the ActiveX dll is invoked via
Javascript in the hope that it would have been self-registered. But
unfortunately it is not and I get an error as "missing method exception". I
wonder what self-registering really means !

The other idea of writing another DLL for the sake of registering the
activeX is one I will find hard to convince others, leave alone myself.

That will lead me to decide that may be this could not be done on the .NET
default emulator. But I want to see if there is a way to do it before I
conclude.

Thank you.
-Praveen

Paul G. Tobey said:
Is the ActiveX self-registering, as most are? You should be able to
LoadLibrary() it, GetProcAddress() it for its DLLRegisterServer routine, and
then call that function, finishing up with a FreeLibrary(). However, I
don't think that you can call from managed code through a function pointer
(although I could definitely be wrong about that).

If you can't, you'll have to, at least, write a DLL that will perform the
operations above via an exported function and call that function from your
managed code. Are you sure that just writing all this registration code in
unmanaged code isn't the best way instead?

Paul T.

Praveen said:
Yes. I understand. Let me explain in detail. I have an ATL activeX dll
developed in eVC. I have a managed application where I use a web browser
control. I want to create the activeX object instance from the web browser
control on a particular event. I am trying to test this scenario in the .NET
default emulator. I have the activeX dll part of the managed project and the
issue I am faced with is to figure out a way to register the activeX in the
.NET default emulator before instantiating the object. Because it is not
registered the instantiation of the activeX object always fails.

Is there a way ? Did I make it clear ?

Thank you for the response.


Chris Tacke said:
You cannot create ActiveX components for smart devices with managed code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420 emulator.
But
I have a application that is created in C# and it tested on the default
.NET
emulator. I was looking if there is a way to run it on the 'Windows CE
.NET
(default)emulator'.

Regards.
-P
"Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK
for
the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.

--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the
device
after registering the activeX on the device by building it from
embedded
VC++. If I have to test it on emulator how do I register the activeX
on
the
..NET emulator which is different from the eVC emulator. Should I
write
a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 
P

Paul G. Tobey [eMVP]

Self-registering means that the DLL can be called to add any entries that it
needs to the registry (DllRegisterServer). A non-self-registering DLL would
not have that entry point and an installation program or something would
have to add the necessary entries to the registry.

At what point would anything in Windows CE decide to call DllRegisterServer
on your DLL? There's *no* point where it would decide that. It doesn't
randomly load and call that function in DLLs from all over the filesystem.
As far as VS.NET knows, the file that you've added to your project could be
a text file, so it's not going to tell the emulator to register it.

There's nothing surprising going on there at all, as far as I'm concerned.
You could easily write a little C program in about five minutes to run on
the emulator and verify that you can register the DLL...

Paul T.

Praveen said:
Thank you for the inputs. If I could get the DLL to self register on the
emulator, as it should, that is the best option I have. But I don't see that
happening. I don't know if I am missing something here. All I do is add the
compiled ATL activeX DLL into the managed to project by adding it as an
existing item. Then the function inside the ActiveX dll is invoked via
Javascript in the hope that it would have been self-registered. But
unfortunately it is not and I get an error as "missing method exception". I
wonder what self-registering really means !

The other idea of writing another DLL for the sake of registering the
activeX is one I will find hard to convince others, leave alone myself.

That will lead me to decide that may be this could not be done on the .NET
default emulator. But I want to see if there is a way to do it before I
conclude.

Thank you.
-Praveen

Paul G. Tobey said:
Is the ActiveX self-registering, as most are? You should be able to
LoadLibrary() it, GetProcAddress() it for its DLLRegisterServer routine, and
then call that function, finishing up with a FreeLibrary(). However, I
don't think that you can call from managed code through a function pointer
(although I could definitely be wrong about that).

If you can't, you'll have to, at least, write a DLL that will perform the
operations above via an exported function and call that function from your
managed code. Are you sure that just writing all this registration code in
unmanaged code isn't the best way instead?

Paul T.

the
.NET and
the in
the
'Windows
CE
.NET
(default)emulator'.

Regards.
-P
"Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
Why don't you deploy to the other emulator? eVC should automatically
register it. If it's a custom emulator then you will need an SDK for
the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.

--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact framework
project. I am able to use the activeX from the .NET project on the
device
after registering the activeX on the device by building it from
embedded
VC++. If I have to test it on emulator how do I register the
activeX
on
the
..NET emulator which is different from the eVC emulator.
Should
 
P

Praveen

Paul,

Appreciate your help. Let me state my *real* problem here.

I have the code that is necessary to register. That is simple C code. I
compile it and build a DLL, lets call it RegisterDll, just for the purpose
of registering an activeX which is in another DLL. I build it for
STANDARDSDK_420 emulator that is the default in *eVC*. Now I try to P/Invoke
the exported function of the RegisterDll from my .NET project. But here my
default emulator is called *.NET default emulator* which is not the same in
eVC. When I P/Invoke I get a "missing method exception".

If I try the same procedure with PocketPC 2003 emulator in eVC and .NET
which are the same I am able to P/Invoke. I also have it working on the
device. The issue here is when I build the code for STANDARDSDK_420, the
default eVC emulator, I cannot call the functions in the dll from a .NET
project run on .NET default emulator. You may try a simple example and see
it for yourself.

The question is simply "I have no device. I want to register an ATL ActiveX
which I want to use in my application running on .NET default emulator. Is
there a way".

Thank you very much for all your efforts.

-Praveen

Paul G. Tobey said:
Self-registering means that the DLL can be called to add any entries that it
needs to the registry (DllRegisterServer). A non-self-registering DLL would
not have that entry point and an installation program or something would
have to add the necessary entries to the registry.

At what point would anything in Windows CE decide to call DllRegisterServer
on your DLL? There's *no* point where it would decide that. It doesn't
randomly load and call that function in DLLs from all over the filesystem.
As far as VS.NET knows, the file that you've added to your project could be
a text file, so it's not going to tell the emulator to register it.

There's nothing surprising going on there at all, as far as I'm concerned.
You could easily write a little C program in about five minutes to run on
the emulator and verify that you can register the DLL...

Paul T.

Praveen said:
Thank you for the inputs. If I could get the DLL to self register on the
emulator, as it should, that is the best option I have. But I don't see that
happening. I don't know if I am missing something here. All I do is add the
compiled ATL activeX DLL into the managed to project by adding it as an
existing item. Then the function inside the ActiveX dll is invoked via
Javascript in the hope that it would have been self-registered. But
unfortunately it is not and I get an error as "missing method
exception".
I
wonder what self-registering really means !

The other idea of writing another DLL for the sake of registering the
activeX is one I will find hard to convince others, leave alone myself.

That will lead me to decide that may be this could not be done on the ..NET
default emulator. But I want to see if there is a way to do it before I
conclude.

Thank you.
-Praveen

Paul G. Tobey said:
Is the ActiveX self-registering, as most are? You should be able to
LoadLibrary() it, GetProcAddress() it for its DLLRegisterServer
routine,
and
then call that function, finishing up with a FreeLibrary(). However, I
don't think that you can call from managed code through a function pointer
(although I could definitely be wrong about that).

If you can't, you'll have to, at least, write a DLL that will perform the
operations above via an exported function and call that function from your
managed code. Are you sure that just writing all this registration
code
in
unmanaged code isn't the best way instead?

Paul T.

Yes. I understand. Let me explain in detail. I have an ATL activeX dll
developed in eVC. I have a managed application where I use a web browser
control. I want to create the activeX object instance from the web browser
control on a particular event. I am trying to test this scenario in the
.NET
default emulator. I have the activeX dll part of the managed project and
the
issue I am faced with is to figure out a way to register the activeX in
the
.NET default emulator before instantiating the object. Because it is not
registered the instantiation of the activeX object always fails.

Is there a way ? Did I make it clear ?

Thank you for the response.


You cannot create ActiveX components for smart devices with managed
code.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
---
Principal Partner
OpenNETCF Consulting
www.OpenNETCF.com



Thank you for the reply Mark.

I know eVC would automatically register to the STANDARDSDK_420
emulator.
But
I have a application that is created in C# and it tested on the
default
.NET
emulator. I was looking if there is a way to run it on the
'Windows
CE
.NET
(default)emulator'.

Regards.
-P
"Mark Arteaga" <ng_[at]_markarteaga_[dot]_com> wrote in message
Why don't you deploy to the other emulator? eVC should
automatically
register it. If it's a custom emulator then you will need an
SDK
for
the
emulator. But if it's the standard emulator then deployment and
registration should be handled by eVC.

--
Mark Arteaga
info_[at]_markarteaga_[dot]_com


:

Hi,

I have a ATL activeX dll. I am using it in a .NET compact
framework
project. I am able to use the activeX from the .NET project
on
the
device
after registering the activeX on the device by building it from
embedded
VC++. If I have to test it on emulator how do I register the
activeX
on
the
..NET emulator which is different from the eVC emulator.
Should
I
write
a
third application for that?

Appreciate your help.

Thanks.
-Praveen
 

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

Top